/* 
 * Reservation Lookup - Responsywne style CSS
 * Mobile-first approach z naciskiem na responsywność
 */

/* === RESET I PODSTAWY === */
.reservation-lookup-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
}

.reservation-lookup-container * {
    box-sizing: border-box;
}

/* === FORMULARZ WYSZUKIWANIA === */
.reservation-lookup-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.reservation-lookup-title {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #e70700;
    padding-bottom: 10px;
}

/* === KOMUNIKATY BŁĘDÓW === */
.error-message {
    background: #fee;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

.error-message i {
    color: #dc3545;
    font-size: 16px;
}

/* === FORMULARZ === */
.reservation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #a0a0a0;
    font-size: 14px;
}

/* === PRZYCISKI === */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #e70700, #e70700);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #545b62;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === SZCZEGÓŁY REZERWACJI === */
.reservation-details-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* === HEADER === */
.reservation-header {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    text-align: center;
}

.reservation-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
}

.reservation-code-display {
    background: #f2f2f2;
    border-radius: 0;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 3.0rem;
    font-weight: bold;
    letter-spacing: 1px;
    display: inline-block;
    border: 2px solid #e70700;
    color: #000000;
}

.header-subtitle {
    color: #000000;
    margin-top: 10px;
    font-size: 0.9rem;
}

/* === SEKCJE === */
.reservation-section {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.reservation-section:last-of-type {
    border-bottom: none;
}

.section-title {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    text-align: center;
    justify-content: center;
}

.section-title i {
    color: #e70700;
    font-size: 1.2rem;
}

.section-content {
    margin-top: 15px;
}

/* === SZCZEGÓŁY === */
.detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: #2c3e50;
    font-size: 16px;
    word-wrap: break-word;
}

.detail-value a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.detail-value a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* === CUSTOMER SUBSECTIONS === */
.customer-subsection {
    margin-bottom: 25px;
}

.customer-subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
    padding: 8px 12px;
    background: #f2f2f2;
    border-radius: 0;
    border-left: 4px solid #e70700;
}

/* === DOCUMENT FIELDS === */
.document-number {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-weight: 600;
    letter-spacing: 1px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e3e6ea;
}

.not-provided {
    color: #6c757d;
    font-style: italic;
    font-weight: 500;
}

/* === LICENSE STATUS === */
.license-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.license-expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.license-expiring {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.license-status:not(.license-expired):not(.license-expiring) {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* === EMAIL AND PHONE LINKS === */
.email-link, .phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.email-link:hover, .phone-link:hover {
    background: #e3f2fd;
    text-decoration: none;
}

.email-link::before {
    content: '✉';
    font-size: 14px;
}

.phone-link::before {
    content: '📞';
    font-size: 14px;
}

/* === RENTAL SUBSECTIONS === */
.rental-subsection {
    margin-bottom: 25px;
}

.rental-subsection:last-child {
    margin-bottom: 0;
}

/* === DATES STYLING === */
.pickup-date {
    color: #000000;
    font-weight: 600;
}

.return-date {
    color: #e70700;
    font-weight: 600;
}

.rental-duration {
    background: #f2f2f2;
    padding: 4px 8px;
    border-radius: 0;
    font-weight: 600;
    color: #000000;
}

/* === VEHICLES STYLING === */
.vehicles-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vehicle-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007bff;
}

.vehicle-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.vehicle-number {
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.vehicle-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
}

.vehicle-units {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.spec-item {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #bbdefb;
}

/* === STATUS STYLING === */
.payment-status,
.booking-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-unpaid {
    background: #ffffff;
    color: #e70700;
    border: 2px solid #e70700;
}

.status-paid {
    background: #f2f2f2;
    color: #000000;
    border: 2px solid #000000;
}

.status-refunded {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.status-cancelled {
    background: #e70700;
    color: #ffffff;
    border: 2px solid #e70700;
}

.status-completed {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.status-completed-early {
    background: #f2f2f2;
    color: #000000;
    border: 2px solid #000000;
}

.status-active {
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
}

.status-upcoming {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.status-unknown {
    background: #f2f2f2;
    color: #000000;
    border: 2px solid #000000;
}

/* === FINANCIAL SUMMARY === */
.financial-summary {
    background: #f2f2f2;
    border-radius: 0;
    padding: 20px;
    border: 2px solid #000000;
}

.total-row {
    background: #ffffff;
    border-radius: 0;
    margin-bottom: 15px;
    padding: 15px;
}

.total-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e70700;
}

.deposit-amount {
    color: #000000;
    font-weight: 600;
}

.pay-now {
    color: #e70700;
    font-weight: 600;
}

.pay-later {
    color: #000000;
    font-weight: 600;
}



.btn-outline {
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
}

.btn-outline:hover {
    background: #000000;
    color: #ffffff;
}

.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

/* === AKCJE === */
.reservation-actions {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
}

/* === ANIMACJE === */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.reservation-details-container {
    animation: fadeIn 0.5s ease-out;
}

/* === LOADING STATES === */
.btn.loading {
    pointer-events: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loader {
    display: flex;
}

/* === TABLET STYLES (768px+) === */
@media (min-width: 768px) {
    .reservation-lookup-container {
        padding: 20px;
        max-width: 800px;
    }

    .reservation-lookup-form {
        padding: 30px;
    }

    .reservation-lookup-title {
        font-size: 1.8rem;
    }

    .detail-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }

    .detail-label {
        flex: 0 0 40%;
        margin-bottom: 0;
    }

    .detail-value {
        flex: 1;
        text-align: right;
    }

    .form-actions {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .reservation-section {
        padding: 25px 30px;
    }

    .reservation-header {
        padding: 25px 30px;
    }

    .customer-subsection {
        margin-bottom: 30px;
    }

    .subsection-title {
        font-size: 1.5rem;
    }

    /* Better spacing for documents on tablet */
    .document-number {
        font-size: 15px;
        padding: 6px 10px;
    }

    /* Rental subsections spacing */
    .rental-subsection {
        margin-bottom: 30px;
    }

    /* Vehicles layout improvements */
    .vehicles-list {
        gap: 20px;
    }

    .vehicle-item {
        padding: 20px;
    }

    .vehicle-header {
        margin-bottom: 12px;
    }

    .vehicle-name {
        font-size: 1.2rem;
    }

    /* Financial summary improvements */
    .financial-summary {
        padding: 25px;
    }

    .total-row {
        padding: 20px;
    }

    .total-amount {
        font-size: 1.5rem;
    }

    /* === DESKTOP STYLES (1024px+) === */
    @media (min-width: 1024px) {
        .reservation-lookup-container {
            padding: 30px;
            max-width: 900px;
        }

        .reservation-lookup-form {
            padding: 40px;
        }

        .reservation-lookup-title {
            font-size: 2rem;
        }

        .form-input {
            font-size: 18px;
            padding: 15px 20px;
        }

        .btn {
            padding: 15px 30px;
            font-size: 18px;
            min-height: 54px;
        }

        .section-title {
            font-size: 1.3rem;
        }

        .detail-value {
            font-size: 18px;
        }
    }

    /* === LARGE DESKTOP (1200px+) === */
    @media (min-width: 1200px) {
        .reservation-lookup-container {
            max-width: 1000px;
        }
    }

    /* === ACCESSIBILITY === */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    /* Focus indicators for keyboard navigation */
    .btn:focus,
    .form-input:focus {
        outline: 2px solid #3498db;
        outline-offset: 2px;
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .reservation-lookup-container {
            border: 2px solid;
        }

        .btn-primary {
            background: #000;
            border: 2px solid #fff;
        }

        .detail-row {
            border: 1px solid;
        }
    }

    /* === PRINT STYLES === */
    @media print {
        .reservation-lookup-form,
        .reservation-actions,
        .btn {
            display: none !important;
        }

        .reservation-details-container {
            box-shadow: none;
            border: 1px solid #000;
        }

        .reservation-header {
            background: #f0f0f0 !important;
            color: #000 !important;
        }
    }

    /* === DARK MODE SUPPORT === */
    @media (prefers-color-scheme: dark) {
        .reservation-lookup-container {
            background: #1a1a1a;
            color: #e0e0e0;
        }

        .reservation-header {
            background: #000000;
            color: #ffffff;
            border-bottom-color: #e70700;
        }

        .reservation-title {
            color: #ffffff;
        }

        .reservation-code-display {
            background: #f2f2f2;
            color: #000000;
            border-color: #e70700;
        }

        .header-subtitle {
            color: #ffffff;
        }

        .reservation-lookup-form,
        .reservation-details-container {
            background: #2d3748;
            border-color: #4a5568;
            color: #e0e0e0;
        }

        .form-input {
            background: #2d3748;
            border-color: #4a5568;
            color: #e0e0e0;
        }

        .form-input:focus {
            border-color: #63b3ed;
        }

        .detail-row {
            background: #1a202c;
        }

        .section-title {
            color: #e0e0e0;
        }

        .detail-label {
            color: #a0aec0;
        }

        .detail-value {
            color: #e0e0e0;
        }

        .subsection-title {
            background: #000000;
            color: #ffffff;
            border-left-color: #e70700;
        }

        .document-number {
            background: #1f2937;
            border-color: #374151;
            color: #f3f4f6;
        }

        .not-provided {
            color: #9ca3af;
        }

        .license-expired {
            background: #7f1d1d;
            color: #fecaca;
            border-color: #991b1b;
        }

        .license-expiring {
            background: #78350f;
            color: #fed7aa;
            border-color: #92400e;
        }

        .license-status:not(.license-expired):not(.license-expiring) {
            background: #064e3b;
            color: #a7f3d0;
            border-color: #065f46;
        }

        .email-link:hover, .phone-link:hover {
            background: #1e40af;
        }

        /* Rental sections dark mode */
        .rental-subsection {
            border-top: 1px solid #374151;
        }

        .rental-duration {
            background: #000000;
            color: #ffffff;
        }

        .vehicle-item {
            background: #000000;
            border-color: #ffffff;
            border-left-color: #e70700;
        }

        .vehicle-name {
            color: #ffffff;
        }

        .spec-item {
            background: #f2f2f2;
            color: #000000;
            border-color: #000000;
        }

        /* Status indicators dark mode */
        .status-unpaid {
            background: #7c2d12;
            color: #fed7aa;
            border-color: #ea580c;
        }

        .status-paid {
            background: #064e3b;
            color: #a7f3d0;
            border-color: #059669;
        }

        .status-refunded {
            background: #1e3a8a;
            color: #bfdbfe;
            border-color: #3b82f6;
        }

        .status-cancelled {
            background: #7f1d1d;
            color: #fecaca;
            border-color: #dc2626;
        }

        .status-completed {
            background: #581c87;
            color: #e9d5ff;
            border-color: #8b5cf6;
        }

        .status-active {
            background: #064e3b;
            color: #a7f3d0;
            border-color: #059669;
        }

        .status-upcoming {
            background: #0c4a6e;
            color: #bae6fd;
            border-color: #0284c7;
        }

        /* Financial summary dark mode */
        .financial-summary {
            background: #000000;
            border-color: #ffffff;
        }

        .total-row {
            background: #000000;
        }

        .total-amount {
            color: #e70700;
        }

        .deposit-amount {
            color: #ffffff;
        }

        .pay-now {
            color: #e70700;
        }

        .pay-later {
            color: #ffffff;
        }

        .btn-outline {
            color: #ffffff;
            border-color: #ffffff;
        }

        .btn-outline:hover {
            background: #ffffff;
            color: #000000;
        }
    }
}
