/**
 * Custom Shepherd.js Theme untuk Registration Tour
 * Responsive dan modern design
 */

/* Base Shepherd Styles */
.shepherd-modal-overlay-container {
    display: none !important;
}

/* Custom overlay styling */
#custom-tour-overlay {
    pointer-events: none;
}

.shepherd-element {
    z-index: 9999 !important;
    max-width: 400px;
    font-family: inherit;
}

/* Shepherd Content */
.shepherd-content {
    border-radius: 12px;
    padding: 0;
    background: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shepherd-header {
    padding: 20px 20px 0;
    border-radius: 12px 12px 0 0;
}

.shepherd-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.5;
}

.shepherd-text {
    padding: 16px 20px;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #475569;
}

.shepherd-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Buttons */
.shepherd-button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #3b82f6;
    color: white;
}

.shepherd-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.shepherd-button:active {
    transform: translateY(0);
}

.shepherd-button-secondary {
    background: #f1f5f9;
    color: #475569;
}

.shepherd-button-secondary:hover {
    background: #e2e8f0;
}

/* Cancel Icon */
.shepherd-cancel-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
    color: white;
}

.shepherd-cancel-icon:hover {
    opacity: 1;
}

.shepherd-cancel-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

/* Arrow */
.shepherd-arrow {
    display: none;
}

.shepherd-has-title .shepherd-content .shepherd-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 20px;
    margin: 0;
    position: relative;
}

.shepherd-has-title .shepherd-content .shepherd-title {
    color: white;
    padding-right: 30px;
}

.shepherd-has-title .shepherd-cancel-icon {
    color: white;
    opacity: 0.9;
}

.shepherd-has-title .shepherd-cancel-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.shepherd-has-title .shepherd-cancel-icon svg {
    stroke: white !important;
    fill: none !important;
}

/* Modal Overlay */
.shepherd-modal-overlay-container.shepherd-modal-is-visible {
    opacity: 1;
}

.shepherd-modal-overlay-container {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Target Element Highlight */
.shepherd-target {
    position: relative;
    z-index: 9999;
}

.shepherd-enabled.shepherd-target {
    pointer-events: auto;
}

/* Progress Indicator */
.shepherd-progress {
    background: #e2e8f0;
    height: 4px;
    border-radius: 2px;
    margin: 0 20px 16px;
    overflow: hidden;
}

.shepherd-progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    height: 100%;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 640px) {
    .shepherd-element {
        max-width: calc(100vw - 24px);
        margin: 0 12px;
    }
    
    .shepherd-content {
        border-radius: 8px;
    }
    
    .shepherd-header {
        padding: 12px 12px 0;
    }
    
    .shepherd-title {
        font-size: 0.9375rem;
        line-height: 1.4;
    }
    
    .shepherd-text {
        padding: 10px 12px;
        font-size: 0.8125rem;
        line-height: 1.5;
    }
    
    .shepherd-footer {
        padding: 0 12px 12px;
        flex-direction: column;
        gap: 6px;
    }
    
    .shepherd-button {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 0.8125rem;
    }
    
    .shepherd-cancel-icon {
        top: 10px;
        right: 10px;
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 375px) {
    .shepherd-element {
        max-width: calc(100vw - 16px);
        margin: 0 8px;
    }
    
    .shepherd-header {
        padding: 10px 10px 0;
    }
    
    .shepherd-title {
        font-size: 0.875rem;
    }
    
    .shepherd-text {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .shepherd-footer {
        padding: 0 10px 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .shepherd-content {
        background: #1e293b;
    }
    
    .shepherd-title {
        color: #f1f5f9;
    }
    
    .shepherd-text {
        color: #cbd5e1;
    }
    
    .shepherd-button-secondary {
        background: #334155;
        color: #e2e8f0;
    }
    
    .shepherd-button-secondary:hover {
        background: #475569;
    }
}

/* Animation */
@keyframes shepherd-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.shepherd-element {
    animation: shepherd-fade-in 0.2s ease;
}

/* Help Button (Floating Action Button) */
.tour-help-button {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.35), 0 4px 6px -2px rgba(220, 38, 38, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 9997;
}

.tour-help-button:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(220, 38, 38, 0.4), 0 10px 10px -5px rgba(220, 38, 38, 0.2);
}

.tour-help-button:active {
    transform: scale(0.95);
}

@media (max-width: 640px) {
    .tour-help-button {
        width: 48px;
        height: 48px;
        bottom: 16px;
        left: 16px;
        font-size: 20px;
    }
}

/* Tooltip for help button */
.tour-help-button::before {
    content: 'Laporkan Kendala';
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background: #1e293b;
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tour-help-button:hover::before {
    opacity: 1;
}

@media (max-width: 640px) {
    .tour-help-button::before {
        display: none;
    }
}
