/* Hotspot Booking Widget - CSS Styles */

.hotspot-booking-container {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.hotspot-booking-image-container {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.hotspot-booking-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Improved precise positioning for hotspots */
.hotspot-booking-item {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #4054b2;
    cursor: pointer;
    /* Use exact pixel positioning with no rounding or transformation */
    top: 0;
    left: 0;
    z-index: 1;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hotspot-booking-item:hover {
    /* Only scale on hover */
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.hotspot-booking-item.booked {
    background-color: #e04646;
}

.hotspot-booking-popup {
    position: absolute;
    min-width: 250px;
    max-width: 320px;
    background-color: #ffffff;
    color: #333333;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 20px;
    z-index: 2;
    /* Improved positioning */
    transform: translate(-50%, -110%);
    margin-top: -15px;
}

.hotspot-booking-popup::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
}

.hotspot-booking-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #999999;
    line-height: 1;
}

.hotspot-booking-popup-close:hover {
    color: #333333;
}

.hotspot-booking-popup-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.hotspot-booking-popup-name {
    margin-bottom: 20px;
    font-weight: 500;
    color: #555555;
}

.hotspot-booking-form-group {
    margin-bottom: 15px;
}

.hotspot-booking-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555555;
}

.hotspot-booking-form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    font-size: 14px;
    color: #333333;
    background-color: #f8f8f8;
    transition: border-color 0.3s ease;
}

.hotspot-booking-form-group input:focus {
    outline: none;
    border-color: #4054b2;
    background-color: #ffffff;
}

.hotspot-booking-submit {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4054b2;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hotspot-booking-submit:hover {
    background-color: #2e3c8a;
}

.hotspot-booking-submit:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.hotspot-booking-popup-success, 
.hotspot-booking-popup-error, 
.hotspot-booking-popup-booked {
    margin-top: 15px;
    padding: 10px;
    border-radius: 3px;
}

.hotspot-booking-popup-success {
    background-color: #e6f7e6;
    color: #3c763d;
    border: 1px solid #d0e9c6;
}

.hotspot-booking-popup-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hotspot-booking-popup-booked {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Responsive Styles */
@media only screen and (max-width: 767px) {
    .hotspot-booking-popup {
        min-width: 200px;
        max-width: 280px;
        padding: 15px;
    }
    
    .hotspot-booking-popup-title {
        font-size: 16px;
    }
    
    .hotspot-booking-form-group input {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .hotspot-booking-submit {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Animation for Hotspots */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(64, 84, 178, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(64, 84, 178, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(64, 84, 178, 0);
    }
}

.hotspot-booking-item:not(.booked) {
    animation: pulse 2s infinite;
}

.hotspot-booking-item.booked {
    animation: none;
}

/* Special design for booked hotspots */
.hotspot-booking-item.booked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
}

/* Fix for Elementor editor and frontend consistency */
.elementor-editor-active .hotspot-booking-item,
.elementor-editor-preview .hotspot-booking-item {
    /* Ensure exact same positioning rules as in frontend */
    top: 0;
    left: 0;
}