/*
 * Clean Driver.js/Filament Tour CSS
 * This file contains only Driver.js styles without @tailwind base directives
 * that would break Filament's styling.
 *
 * Used by: App\Providers\FilamentTourCssOverrideServiceProvider
 */

/* Core Pointer Events */
.driver-active *,
.driver-active .driver-overlay {
    pointer-events: none;
}

.driver-active .driver-active-element,
.driver-active .driver-active-element *,
.driver-popover,
.driver-popover * {
    pointer-events: auto;
}

/* Fade Animation */
@keyframes animate-fade-in {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.driver-fade .driver-overlay,
.driver-fade .driver-popover {
    animation: animate-fade-in 0.2s ease-in-out;
}

/* Popover Base */
.driver-popover {
    all: revert;
    box-sizing: border-box;
    color: #2d2d2d;
    min-width: 300px !important;
    max-width: 750px !important;
    background-color: #fff;
    margin: 0;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
    z-index: 1000000000;
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
}

.driver-popover * {
    font-family: inherit;
}

/* Popover Title */
.driver-popover-title {
    font-size: 1.125rem;
    font-weight: 700;
    display: block;
    position: relative;
    line-height: 1.5;
    margin: 0;
}

.driver-popover-title[style*="block"] + .driver-popover-description {
    margin-top: 5px;
}

/* Popover Description */
.driver-popover-description {
    margin-bottom: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Close Button - "Tour overslaan" */
.driver-popover-close-btn {
    all: unset !important;
    position: static !important;
    top: unset !important;
    right: unset !important;
    order: -1 !important;
    align-self: flex-end !important;
    cursor: pointer !important;
    font-size: 0 !important;
    color: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.15s !important;
    background: transparent !important;
    border: none !important;
    box-sizing: border-box !important;
    padding: 0 0 8px 0 !important;
}

.driver-popover-close-btn::before {
    content: 'Tour overslaan' !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.driver-popover-close-btn:focus,
.driver-popover-close-btn:hover {
    background: transparent !important;
}

.driver-popover-close-btn:hover::before {
    color: #374151 !important;
}

/* Footer */
.driver-popover-footer {
    margin-top: 1rem;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.driver-popover-progress-text {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

/* Navigation Buttons */
.driver-popover-navigation-btns {
    display: flex;
    flex-grow: 1;
    justify-content: flex-end;
    gap: 0.5rem;
}

.driver-popover-footer button {
    all: revert;
    display: inline-block;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    outline: 0;
    line-height: 1.3;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.15s;
    border: none;
}

.driver-popover-footer .driver-popover-btn-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Previous Button - Gray Style */
.driver-popover-footer button.driver-popover-prev-btn {
    background-color: #fff;
    color: #374151;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #d1d5db;
}

.driver-popover-footer button.driver-popover-prev-btn:hover {
    background-color: #f9fafb;
}

/* Next Button - Primary Orange */
.driver-popover-footer button.driver-popover-next-btn {
    background-color: #ff9d31;
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.driver-popover-footer button.driver-popover-next-btn:hover {
    background-color: #ea8c1e;
}

/* Arrow Base */
.driver-popover-arrow {
    content: "";
    position: absolute;
    border: 5px solid #fff;
}

/* Arrow Sides */
.driver-popover-arrow-side-over,
.driver-popover-arrow-side-center,
.driver-popover-arrow-none {
    display: none;
}

.driver-popover-arrow-side-left {
    left: 100%;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-top-color: transparent;
}

.driver-popover-arrow-side-right {
    right: 100%;
    border-left-color: transparent;
    border-bottom-color: transparent;
    border-top-color: transparent;
}

.driver-popover-arrow-side-top {
    top: 100%;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

.driver-popover-arrow-side-bottom {
    bottom: 100%;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
}

/* Arrow Alignment - Start */
.driver-popover-arrow-side-left.driver-popover-arrow-align-start,
.driver-popover-arrow-side-right.driver-popover-arrow-align-start {
    top: 15px;
}

.driver-popover-arrow-side-top.driver-popover-arrow-align-start,
.driver-popover-arrow-side-bottom.driver-popover-arrow-align-start {
    left: 15px;
}

/* Arrow Alignment - End */
.driver-popover-arrow-side-left.driver-popover-arrow-align-end,
.driver-popover-arrow-side-right.driver-popover-arrow-align-end {
    bottom: 15px;
}

.driver-popover-arrow-side-top.driver-popover-arrow-align-end,
.driver-popover-arrow-side-bottom.driver-popover-arrow-align-end {
    right: 15px;
}

/* Arrow Alignment - Center */
.driver-popover-arrow-side-left.driver-popover-arrow-align-center,
.driver-popover-arrow-side-right.driver-popover-arrow-align-center {
    top: 50%;
    margin-top: -5px;
}

.driver-popover-arrow-side-top.driver-popover-arrow-align-center,
.driver-popover-arrow-side-bottom.driver-popover-arrow-align-center {
    left: 50%;
    margin-left: -5px;
}

/* Utility */
:not(body):has(> .driver-active-element) {
    overflow: hidden !important;
}

.driver-no-interaction,
.driver-no-interaction * {
    pointer-events: none !important;
}

/* Element Picker Highlight */
#tour-element-picker-highlight {
    position: fixed;
    pointer-events: none;
    border: 2px dashed #ff9d31;
    background: rgba(255, 157, 49, 0.1);
    z-index: 999999;
    transition: all 0.1s ease;
    display: none;
}
