/**
 * CEZN Page Tours - Custom Styling
 * Overrides Driver.js default styles to match CEZN design system
 */

/* Popover container */
.driver-popover {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #E6E8EA !important;
    max-width: 340px !important;
    padding: 0 !important;
    overflow: hidden;
}

/* Popover arrow */
.driver-popover-arrow {
    border: 8px solid transparent !important;
}

.driver-popover-arrow-side-left {
    border-left-color: #ffffff !important;
}

.driver-popover-arrow-side-right {
    border-right-color: #ffffff !important;
}

.driver-popover-arrow-side-top {
    border-top-color: #ffffff !important;
}

.driver-popover-arrow-side-bottom {
    border-bottom-color: #ffffff !important;
}

/* Title section */
.driver-popover-title {
    background: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%) !important;
    color: #1E2329 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    border-bottom: none !important;
}

/* Description section */
.driver-popover-description {
    color: #474D57 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 16px 20px !important;
    margin: 0 !important;
}

/* Progress text */
.driver-popover-progress-text {
    color: #707A8A !important;
    font-size: 12px !important;
    padding: 0 20px 12px 20px !important;
}

/* Footer with buttons */
.driver-popover-footer {
    padding: 12px 20px 16px 20px !important;
    background: #FAFAFA !important;
    border-top: 1px solid #E6E8EA !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Navigation buttons */
.driver-popover-navigation-btns {
    display: flex !important;
    gap: 8px !important;
}

/* All buttons base style */
.driver-popover-prev-btn,
.driver-popover-next-btn,
.driver-popover-close-btn {
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-shadow: none !important;
}

/* Previous button */
.driver-popover-prev-btn {
    background: #F5F5F5 !important;
    color: #474D57 !important;
}

.driver-popover-prev-btn:hover {
    background: #E6E8EA !important;
}

/* Next button */
.driver-popover-next-btn {
    background: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%) !important;
    color: #1E2329 !important;
}

.driver-popover-next-btn:hover {
    background: linear-gradient(135deg, #F0B90B 0%, #E5A800 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3) !important;
}

/* Close/Done button - same as next */
.driver-popover-close-btn {
    background: linear-gradient(135deg, #02C076 0%, #00A65A 100%) !important;
    color: #ffffff !important;
}

.driver-popover-close-btn:hover {
    background: linear-gradient(135deg, #00A65A 0%, #008F4C 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 192, 118, 0.3) !important;
}

/* Overlay */
.driver-overlay {
    background: rgba(30, 35, 41, 0.75) !important;
}

/* Highlighted element */
.driver-active-element {
    box-shadow: 0 0 0 4px rgba(252, 213, 53, 0.5) !important;
    border-radius: 8px !important;
}

/* Tour button - floating help button */
#cezn-tour-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%);
    color: #1E2329;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(252, 213, 53, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#cezn-tour-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(252, 213, 53, 0.6);
}

/* Tour menu overlay */
#cezn-tour-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tour menu card */
#cezn-tour-menu-overlay > div {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tour option buttons in menu */
.tour-option-btn {
    width: 100%;
    text-align: left;
    transition: all 0.2s ease !important;
}

.tour-option-btn:hover {
    transform: translateX(4px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #cezn-tour-button {
        bottom: 100px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .driver-popover {
        max-width: 300px !important;
        margin: 10px !important;
    }

    .driver-popover-title {
        font-size: 15px !important;
        padding: 14px 16px !important;
    }

    .driver-popover-description {
        font-size: 13px !important;
        padding: 14px 16px !important;
    }

    .driver-popover-footer {
        padding: 10px 16px 14px 16px !important;
        flex-wrap: wrap;
    }

    .driver-popover-prev-btn,
    .driver-popover-next-btn,
    .driver-popover-close-btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
}

/* Dark mode support (if applicable) */
@media (prefers-color-scheme: dark) {
    .driver-popover {
        background: #2B3139 !important;
        border-color: #3C4046 !important;
    }

    .driver-popover-description {
        color: #B7BDC6 !important;
    }

    .driver-popover-progress-text {
        color: #848E9C !important;
    }

    .driver-popover-footer {
        background: #1E2329 !important;
        border-top-color: #3C4046 !important;
    }

    .driver-popover-prev-btn {
        background: #3C4046 !important;
        color: #B7BDC6 !important;
    }

    .driver-popover-prev-btn:hover {
        background: #474D57 !important;
    }
}

/* Pulse animation for tour button to draw attention */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(252, 213, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(252, 213, 53, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(252, 213, 53, 0.4);
    }
}

#cezn-tour-button.pulse {
    animation: pulse 2s infinite;
}

/* First-time visitor attention grabber */
#cezn-tour-button.first-visit {
    animation: pulse 2s infinite, bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}
