/**
 * PDF Export Modal Styling
 * Premium, professional design for service history export feature
 *
 * Features:
 * - Glass morphism backdrop
 * - Gradient buttons
 * - Smooth animations
 * - Subscription tier styling
 * - Mobile responsive
 */

/* ========================================
   MODAL OVERLAY & BACKDROP
   ======================================== */

.pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
    z-index: 11000 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pdfBackdropFadeIn 0.3s ease-out;
    pointer-events: auto;
}

@keyframes pdfBackdropFadeIn {
    from {
        backdrop-filter: blur(0px);
    }
    to {
        backdrop-filter: blur(4px);
    }
}

/* ========================================
   MODAL CONTAINER
   ======================================== */

.pdf-modal-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ========================================
   MODAL HEADER
   ======================================== */

.pdf-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.pdf-modal-title-section {
    flex: 1;
}

.pdf-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.pdf-modal-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.pdf-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pdf-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ========================================
   MODAL BODY
   ======================================== */

.pdf-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.pdf-modal-body::-webkit-scrollbar {
    width: 6px;
}

.pdf-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.pdf-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.pdf-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   VEHICLE PREVIEW CARD
   ======================================== */

.pdf-vehicle-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.pdf-vehicle-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.pdf-vehicle-icon {
    font-size: 32px;
}

.pdf-vehicle-info {
    flex: 1;
}

.pdf-vehicle-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.pdf-vehicle-vin {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 4px 0;
    font-family: 'Courier New', monospace;
}

.pdf-vehicle-mileage {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ========================================
   SUBSCRIPTION TIER BADGE
   ======================================== */

.pdf-subscription-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid;
    border-radius: 10px;
    margin-bottom: 20px;
}

.pdf-tier-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pdf-tier-label {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.pdf-remaining-count {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   OPTIONS SECTION
   ======================================== */

.pdf-options-section {
    margin-bottom: 24px;
}

.pdf-section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.pdf-option-group {
    margin-bottom: 14px;
}

.pdf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.pdf-checkbox-label input[type="checkbox"] {
    display: none;
}

.pdf-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: transparent;
}

.pdf-checkbox-label input[type="checkbox"]:checked + .pdf-checkbox-custom {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pdf-checkbox-label input[type="checkbox"]:checked + .pdf-checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.pdf-label-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.pdf-checkbox-label:hover .pdf-checkbox-custom {
    border-color: rgba(99, 102, 241, 0.8);
}

.pdf-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.pdf-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdf-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
}

.pdf-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pdf-select option {
    background: #1a1a2e;
    color: #ffffff;
}

/* ========================================
   FEATURES LIST
   ======================================== */

.pdf-features-section {
    margin-bottom: 24px;
}

.pdf-features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdf-features-list li {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 0;
}

.pdf-features-list li::before {
    content: '';
    display: inline-block;
    margin-right: 6px;
}

/* ========================================
   PRICING BANNER
   ======================================== */

.pdf-pricing-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.pdf-price-content {
    margin: 0;
}

.pdf-price-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdf-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pdf-price-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ========================================
   MODAL FOOTER
   ======================================== */

.pdf-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   BUTTONS
   ======================================== */

.pdf-btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.pdf-btn-cancel {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.pdf-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pdf-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pdf-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.pdf-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.pdf-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

.pdf-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    z-index: 10000;
}

.pdf-loading-container,
.pdf-success-container,
.pdf-error-container {
    text-align: center;
    color: white;
}

/* ========================================
   SPINNER
   ======================================== */

.pdf-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.pdf-loading-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.pdf-loading-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
}

.pdf-progress-steps {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.pdf-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.pdf-progress-step.active {
    opacity: 1;
}

.pdf-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #6366f1;
    transition: all 0.3s ease;
}

.pdf-progress-step.active .pdf-step-number {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pdf-step-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.pdf-progress-step.active .pdf-step-label {
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   SUCCESS STATE
   ======================================== */

.pdf-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pdf-success-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.pdf-success-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px 0;
}

.pdf-success-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 16px 0 0 0;
    line-height: 1.5;
}

/* ========================================
   ERROR STATE
   ======================================== */

.pdf-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pdf-error-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.pdf-error-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px 0;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .pdf-modal-container {
        border-radius: 12px;
    }

    .pdf-modal-title {
        font-size: 18px;
    }

    .pdf-modal-body {
        padding: 16px;
    }

    .pdf-features-list {
        grid-template-columns: 1fr;
    }

    .pdf-progress-steps {
        gap: 12px;
    }

    .pdf-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pdf-modal-overlay {
        padding: 12px;
    }

    .pdf-modal-container {
        max-height: 100vh;
    }

    .pdf-modal-header {
        padding: 16px;
    }

    .pdf-modal-body {
        padding: 12px;
    }

    .pdf-modal-footer {
        padding: 12px 16px;
    }

    .pdf-modal-title {
        font-size: 16px;
    }

    .pdf-modal-subtitle {
        font-size: 12px;
    }

    .pdf-price-amount {
        font-size: 24px;
    }

    .pdf-progress-steps {
        gap: 8px;
    }

    .pdf-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .pdf-step-label {
        font-size: 10px;
    }
}
