/* ============================================
   MARLTOS REIZEN - Reusable Components
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0,87,184,0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 8px rgba(0,87,184,0.4);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 4px rgba(255,107,53,0.3);
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
    box-shadow: 0 4px 8px rgba(255,107,53,0.4);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
}

.btn-ghost:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

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

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-body {
    padding: 24px;
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,87,184,0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-input.error {
    border-color: var(--error);
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 4px;
    display: none;
}

.form-input.error + .form-error {
    display: block;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    transition: all var(--transition);
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,87,184,0.1);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-accent {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--text-primary);
    color: white;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Price Display */
.price {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

.price-large {
    font-size: 1.75rem;
}

.price-currency {
    font-size: 0.75em;
    margin-right: 2px;
}

.price-from {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Skeleton Components */
.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-img {
    height: 200px;
    border-radius: var(--radius);
}

.skeleton-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px) scale(0.97); }
    to   { opacity: 1; transform: translateX(0)    scale(1);    }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0)    scale(1);    }
    to   { opacity: 0; transform: translateX(24px) scale(0.97); }
}

.toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px 13px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,20,50,0.13), 0 1px 4px rgba(0,0,0,0.07);
    min-width: 280px;
    max-width: 380px;
    animation: toastIn 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
    border: 1px solid transparent;
}

.toast.toast-hide {
    animation: toastOut 0.22s ease forwards;
}

/* Type variants */
.toast.toast-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.toast.toast-warning .toast-icon { color: #d97706; }

.toast.toast-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #7f1d1d;
}
.toast.toast-error .toast-icon { color: var(--error); }

.toast.toast-success {
    background: var(--success-light);
    border-color: #a7f3d0;
    color: #064e3b;
}
.toast.toast-success .toast-icon { color: var(--success); }

.toast.toast-info {
    background: var(--primary-light);
    border-color: #bfdbfe;
    color: var(--primary-dark);
}
.toast.toast-info .toast-icon { color: var(--primary); }

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
}

.toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    color: currentColor;
    opacity: 0.45;
    flex-shrink: 0;
    transition: opacity 0.15s, background 0.15s;
    padding: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.07);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Passenger Counter */
.counter {
    display: flex;
    align-items: center;
    gap: 16px;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    transition: all var(--transition);
    background: var(--surface);
}

.counter-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.counter-value {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
}

.progress-step {
    display: flex;
    align-items: center;
    flex: 1;
}

.progress-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.progress-step.active .progress-step-dot {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.progress-step.completed .progress-step-dot {
    background: var(--success);
    color: white;
}

.progress-step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    margin: 0 8px;
    border-radius: 2px;
    transition: background var(--transition);
}

.progress-step.completed .progress-step-line {
    background: var(--success);
}

.progress-step-label {
    display: none;
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #b8c8da;
    border-radius: 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 220;
    display: none;
    box-shadow: 0 18px 32px -20px rgba(10, 31, 58, 0.55);
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--transition);
    border-bottom: 1px solid #e6edf5;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #eef4fb;
}

.autocomplete-item-code {
    font-weight: 700;
    color: #1f4e7a;
    font-size: 0.82rem;
    min-width: 44px;
}

.autocomplete-item-name {
    color: #1b2b3d;
    font-size: 0.84rem;
}

.autocomplete-item-country {
    color: #5e7085;
    font-size: 0.76rem;
    margin-left: auto;
}

@media (min-width: 1025px) {
    .search-grid .autocomplete-wrapper .autocomplete-dropdown {
        min-width: 360px;
        max-width: min(460px, calc(100vw - 40px));
    }

    .search-grid .autocomplete-wrapper:nth-child(2) .autocomplete-dropdown {
        left: auto;
        right: 0;
    }

    .search-grid .autocomplete-wrapper .autocomplete-item {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) max-content;
        column-gap: 12px;
        align-items: center;
    }

    .search-grid .autocomplete-wrapper .autocomplete-item-name {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .search-grid .autocomplete-wrapper .autocomplete-item-country {
        margin-left: 0;
        white-space: nowrap;
        padding-left: 8px;
    }
}

.autocomplete-empty {
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #5e7085;
    line-height: 1.45;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Range Slider */
.range-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Chip */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

.chip-remove {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all var(--transition);
}

.chip-remove:hover {
    background: var(--primary);
    color: white;
}

/* ============================================
   USP Section — Aviation boarding-pass style
   ============================================ */

.usp-section {
    background: #8bc53f;
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.usp-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc(25% - 1px),
        rgba(255,255,255,0.03) calc(25% - 1px),
        rgba(255,255,255,0.03) 25%
    );
    pointer-events: none;
}

.usp-header {
    max-width: var(--max-width);
    margin: 0 auto 56px;
    position: relative;
}

.usp-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: white;
    margin-bottom: 14px;
}

.usp-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    max-width: 560px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.usp-runway {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    position: relative;
}

.usp-runway::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3) 20%, rgba(255,255,255,0.3) 80%, transparent);
    pointer-events: none;
    z-index: 0;
}

.usp-card {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 40px 32px 36px;
    position: relative;
    overflow: hidden;
    transition: background 0.25s, border-color 0.25s;
    z-index: 1;
}

.usp-card:first-child { border-radius: 12px 0 0 12px; }
.usp-card:last-child  { border-radius: 0 12px 12px 0; }

.usp-card:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.35);
}

.usp-num {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,0.15);
    position: absolute;
    top: 16px;
    right: 20px;
    letter-spacing: -0.04em;
    transition: color 0.25s;
    user-select: none;
}

.usp-card:hover .usp-num {
    color: rgba(255,255,255,0.25);
}

.usp-card-body {
    position: relative;
    z-index: 1;
    margin-top: 24px;
}

.usp-card-body h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.usp-card-body p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
}

.usp-card-tag {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--accent);
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 0 0 6px 0;
}

@media (max-width: 900px) {
    .usp-runway {
        grid-template-columns: repeat(2, 1fr);
    }
    .usp-card:first-child   { border-radius: 12px 0 0 0; }
    .usp-card:nth-child(2)  { border-radius: 0 12px 0 0; }
    .usp-card:nth-child(3)  { border-radius: 0 0 0 12px; }
    .usp-card:last-child    { border-radius: 0 0 12px 0; }
    .usp-runway::before { display: none; }
}

@media (max-width: 540px) {
    .usp-section { padding: 56px 16px; }
    .usp-runway  { grid-template-columns: 1fr; gap: 2px; }
    .usp-card:first-child  { border-radius: 12px 12px 0 0; }
    .usp-card:last-child   { border-radius: 0 0 12px 12px; }
    .usp-card:nth-child(2),
    .usp-card:nth-child(3) { border-radius: 0; }
}

