/**
 * Application Tour Styles
 * Custom styles for Intro.js guided tours
 */

/* Intro.js Overrides */
.introjs-tooltip {
    min-width: 320px;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    overflow: hidden;
}

.introjs-tooltip-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.introjs-tooltip-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.introjs-tooltiptext {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151 !important;
    background: white !important;
}

/* Ensure tooltip body has white background */
.introjs-tooltip {
    background: white !important;
}

.introjs-tooltipbuttons {
    padding: 12px 20px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.introjs-tooltipbuttons a[role="button"] {
    flex-shrink: 0;
}

.introjs-button {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    text-shadow: none;
    border: none;
    transition: all 0.2s ease;
}

.introjs-nextbutton {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.introjs-nextbutton:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: white;
}

.introjs-prevbutton {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.introjs-prevbutton:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Skip button - styled in header */
.introjs-skipbutton {
    position: static !important;
    float: none !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.introjs-skipbutton:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.introjs-donebutton {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.introjs-donebutton:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Progress bar */
.introjs-progress {
    height: 4px;
    background: #e5e7eb;
    margin: 0 20px 12px;
    border-radius: 2px;
}

.introjs-progressbar {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 2px;
}

/* Bullets */
.introjs-bullets {
    padding: 8px 0;
}

.introjs-bullets ul li a {
    width: 8px;
    height: 8px;
    background: #d1d5db;
}

.introjs-bullets ul li a.active {
    background: #2563eb;
    width: 20px;
    border-radius: 4px;
}

/* Highlight */
.introjs-helperLayer {
    border-radius: 8px;
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.6);
}

.introjs-showElement {
    z-index: 9999999 !important;
}

/* Tour content styling */
.tour-content {
    color: #374151;
}

.tour-content p {
    margin-bottom: 10px;
}

.tour-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.tour-content ul li {
    margin-bottom: 6px;
    color: #4b5563;
}

.tour-content ul li strong {
    color: #1f2937;
}

.tour-tip {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    margin-top: 12px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #92400e;
}

.tour-tip i {
    color: #f59e0b;
    margin-right: 6px;
}

/* Tour prompt modal */
.tour-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-prompt-modal.show {
    opacity: 1;
}

.tour-prompt-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tour-prompt-modal.show .tour-prompt-content {
    transform: scale(1);
}

.tour-prompt-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.tour-prompt-icon i {
    font-size: 28px;
    color: white;
}

.tour-prompt-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.tour-prompt-content p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.tour-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tour-prompt-actions .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
}

.tour-prompt-actions .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
}

.tour-prompt-actions .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.tour-dont-show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

.tour-dont-show input {
    cursor: pointer;
}

/* Help button */
.tour-help-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.tour-help-btn i {
    font-size: 22px;
}

/* Tooltip animation */
.introjs-tooltip {
    animation: tourSlideIn 0.3s ease;
}

@keyframes tourSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Arrow styling */
.introjs-arrow {
    border: 8px solid transparent;
}

.introjs-arrow.top {
    border-bottom-color: #2563eb;
    top: -16px;
}

.introjs-arrow.bottom {
    border-top-color: white;
}

.introjs-arrow.left {
    border-right-color: #2563eb;
}

.introjs-arrow.right {
    border-left-color: white;
}

/* Tablet responsive (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .introjs-tooltip {
        min-width: 300px;
        max-width: 380px;
    }

    .introjs-tooltip-header {
        padding: 14px 18px;
    }

    .introjs-tooltip-title {
        font-size: 15px;
    }

    .introjs-tooltiptext {
        padding: 14px 18px;
        font-size: 13px;
    }

    .introjs-tooltipbuttons {
        padding: 10px 18px 14px;
        flex-wrap: wrap;
    }

    .introjs-button {
        padding: 7px 14px;
        font-size: 12px;
    }

    .introjs-skipbutton {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }

    .tour-prompt-content {
        max-width: 360px;
        padding: 28px;
    }

    .tour-prompt-icon {
        width: 56px;
        height: 56px;
    }

    .tour-prompt-icon i {
        font-size: 24px;
    }

    .tour-prompt-content h4 {
        font-size: 18px;
    }

    .tour-prompt-content p {
        font-size: 13px;
    }

    .tour-tip {
        padding: 7px 10px;
        font-size: 12px;
    }

    .tour-help-btn {
        width: 44px;
        height: 44px;
    }

    .tour-help-btn i {
        font-size: 20px;
    }
}

/* Mobile responsive (below 768px) */
@media (max-width: 767px) {
    .introjs-tooltip {
        min-width: 260px;
        max-width: 300px;
        margin: 10px;
    }

    .introjs-tooltip-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .introjs-tooltip-title {
        font-size: 14px;
        flex: 1;
        min-width: 0;
    }

    .introjs-tooltiptext {
        padding: 12px 16px;
        font-size: 13px;
        line-height: 1.5;
    }

    .introjs-tooltipbuttons {
        padding: 10px 16px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .introjs-button {
        padding: 6px 12px;
        font-size: 12px;
    }

    .introjs-skipbutton {
        padding: 5px 10px !important;
        font-size: 11px !important;
        order: 0 !important;
    }

    .introjs-prevbutton,
    .introjs-nextbutton {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .introjs-progress {
        margin: 0 16px 10px;
    }

    .introjs-bullets {
        padding: 6px 0;
    }

    .tour-prompt-content {
        margin: 16px;
        padding: 24px;
        max-width: calc(100% - 32px);
    }

    .tour-prompt-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 16px;
    }

    .tour-prompt-icon i {
        font-size: 22px;
    }

    .tour-prompt-content h4 {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .tour-prompt-content p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .tour-prompt-actions {
        gap: 8px;
    }

    .tour-prompt-actions .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .tour-tip {
        padding: 6px 10px;
        font-size: 12px;
        margin-top: 10px;
    }

    .tour-help-btn {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }

    .tour-help-btn i {
        font-size: 18px;
    }

    .tour-dont-show {
        font-size: 12px;
        margin-top: 12px;
    }
}

/* Small mobile (below 480px) */
@media (max-width: 480px) {
    .introjs-tooltip {
        min-width: 240px;
        max-width: 280px;
    }

    .introjs-tooltip-header {
        padding: 10px 14px;
    }

    .introjs-tooltip-title {
        font-size: 13px;
    }

    .introjs-tooltiptext {
        padding: 10px 14px;
        font-size: 12px;
    }

    .introjs-tooltipbuttons {
        padding: 8px 14px 10px;
    }

    .introjs-button {
        padding: 5px 10px;
        font-size: 11px;
    }

    .tour-prompt-content {
        padding: 20px;
    }

    .tour-prompt-content h4 {
        font-size: 16px;
    }

    .tour-prompt-content p {
        font-size: 12px;
    }
}

/* Dark mode support - disabled for now as app uses light theme */
/*
@media (prefers-color-scheme: dark) {
    .introjs-tooltiptext {
        background: #1f2937;
        color: #e5e7eb;
    }

    .introjs-tooltipbuttons {
        background: #111827;
        border-color: #374151;
    }

    .tour-content ul li {
        color: #9ca3af;
    }

    .tour-content ul li strong {
        color: #f3f4f6;
    }
}
*/
