/**
 * BTR Recovery Banner Styles
 *
 * Stili per il banner sticky di recovery prenotazioni
 * e la sezione My Account "Prenotazioni in corso"
 *
 * @package BornToRideBooking
 * @since 1.0.483
 */

/* ============================================
   RECOVERY BANNER - STICKY TOP
   ============================================ */

.btr-recovery-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-bottom: 2px solid #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.15);
    transform: translateY(-100%);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.btr-recovery-banner--visible {
    transform: translateY(0);
    opacity: 1;
}

.btr-recovery-banner__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    gap: 16px;
}

/* Icona */
.btr-recovery-banner__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btr-recovery-banner__icon svg {
    width: 22px;
    height: 22px;
}

/* Contenuto */
.btr-recovery-banner__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btr-recovery-banner__text {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btr-recovery-banner__text strong {
    color: #1a252f;
    font-weight: 600;
}

.btr-recovery-banner__departure {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
}

/* Azioni */
.btr-recovery-banner__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btr-recovery-banner__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btr-recovery-banner__btn--primary {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btr-recovery-banner__btn--primary:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    color: white;
    text-decoration: none;
}

.btr-recovery-banner__btn--primary:active {
    transform: translateY(0);
}

.btr-recovery-banner__btn svg {
    width: 16px;
    height: 16px;
}

/* Pulsante chiusura */
.btr-recovery-banner__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btr-recovery-banner__close:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #2c3e50;
}

.btr-recovery-banner__close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.btr-recovery-banner__close svg {
    width: 20px;
    height: 20px;
}

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

@media (max-width: 768px) {
    .btr-recovery-banner__container {
        padding: 10px 16px;
        gap: 12px;
    }

    .btr-recovery-banner__icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .btr-recovery-banner__icon svg {
        width: 20px;
        height: 20px;
    }

    .btr-recovery-banner__text {
        font-size: 14px;
    }

    .btr-recovery-banner__departure {
        font-size: 12px;
    }

    .btr-recovery-banner__btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btr-recovery-banner__btn svg {
        width: 14px;
        height: 14px;
    }

    .btr-recovery-banner__close {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 576px) {
    .btr-recovery-banner__container {
        flex-wrap: wrap;
        padding: 12px 14px;
    }

    .btr-recovery-banner__content {
        flex: 1 1 calc(100% - 100px);
        order: 1;
    }

    .btr-recovery-banner__icon {
        order: 0;
    }

    .btr-recovery-banner__close {
        order: 2;
    }

    .btr-recovery-banner__actions {
        flex: 1 1 100%;
        order: 3;
        justify-content: stretch;
        margin-top: 8px;
    }

    .btr-recovery-banner__btn {
        flex: 1;
        justify-content: center;
    }

    .btr-recovery-banner__text {
        white-space: normal;
    }
}

/* ============================================
   MY ACCOUNT - PRENOTAZIONI IN CORSO ENHANCED
   Professional Booking Management Interface
   Updated: 2026 - SVG Icons & Modern Design
   ============================================ */

/* CSS Custom Properties - Unified with My Account Design System */
.btr-myaccount-prenotazioni {
    /* Primary Colors - Unified with My Account theme */
    --btr-primary: #0097c5;
    --btr-primary-hover: #007ba3;
    --btr-primary-light: rgba(0, 151, 197, 0.12);
    --btr-success: #10b981;
    --btr-warning: #f59e0b;
    --btr-danger: #ef4444;
    /* Text Colors */
    --btr-text-primary: #1f2937;
    --btr-text-secondary: #6b7280;
    --btr-text-muted: #9ca3af;
    /* Borders & Backgrounds */
    --btr-border: #e5e7eb;
    --btr-border-light: #f3f4f6;
    --btr-bg-subtle: #f9fafb;
    /* Radius - Consistent with unified system */
    --btr-radius-sm: 8px;
    --btr-radius-md: 12px;
    --btr-radius-lg: 16px;
    --btr-radius-xl: 20px;
    /* Shadows - Clear, visible */
    --btr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --btr-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --btr-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    /* Transitions */
    --btr-transition: all 0.25s ease;

    /* Full-width layout for breathing room */
    width: 100%;
    max-width: none;
}

/* Page Title - Professional Header */
.btr-myaccount-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--btr-text-primary);
    margin: 0 0 28px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--btr-border);
    letter-spacing: -0.02em;
}

/* Animation Keyframes */
@keyframes btrSlideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btrPulseSoft {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

@keyframes btrRipple {
    0% { transform: scale(0, 0); opacity: 0.5; }
    100% { transform: scale(20, 20); opacity: 0; }
}

/* Container with spacing */
.btr-prenotazioni-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 8px 0;
}

/* Card Base - Modern 2026 Clean Style with Visible Borders */
.btr-prenotazione-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    /* Clear, professional shadows - 2026 trend */
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Staggered animation */
    opacity: 0;
    animation: btrSlideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.btr-prenotazione-card:nth-child(1) { animation-delay: 0.05s; }
.btr-prenotazione-card:nth-child(2) { animation-delay: 0.1s; }
.btr-prenotazione-card:nth-child(3) { animation-delay: 0.15s; }
.btr-prenotazione-card:nth-child(4) { animation-delay: 0.2s; }
.btr-prenotazione-card:nth-child(n+5) { animation-delay: 0.25s; }

/* Hover Effects: Subtle elevation with accent */
.btr-prenotazione-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(52, 152, 219, 0.15);
}

/* Header - Modern 2025 Clean Style */
.btr-prenotazione-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 0;
}

.btr-prenotazione-card__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    letter-spacing: -0.01em;
}

.btr-prenotazione-card__title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--btr-primary-light);
    border-radius: var(--btr-radius-md);
    color: var(--btr-primary);
    flex-shrink: 0;
}

.btr-prenotazione-card__title-icon svg {
    width: 22px;
    height: 22px;
}

/* Status Badge - Modern */
.btr-prenotazione-card__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: all 0.2s ease;
}

.btr-prenotazione-card__status--pending {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.12) 0%, rgba(230, 126, 34, 0.08) 100%);
    color: #d35400;
    border: 1px solid rgba(230, 126, 34, 0.25);
}

.btr-prenotazione-card__status--pending::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e67e22;
    animation: btrPulseSoft 2s infinite;
}

.btr-prenotazione-card__status--active {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.12) 0%, rgba(39, 174, 96, 0.08) 100%);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.25);
}

.btr-prenotazione-card__status--active::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27ae60;
    animation: btrPulseSoft 2s infinite;
}

.btr-prenotazione-card__status--expired {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.12) 0%, rgba(231, 76, 60, 0.08) 100%);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

/* Details Section - Modern 2026 Bento Grid Style */
.btr-prenotazione-card__details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 20px 28px;
    background: #f8fafc;
    border-top: none;
    border-bottom: none;
    margin-bottom: 0;
}

.btr-prenotazione-card__detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease;
}

.btr-prenotazione-card__detail:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btr-prenotazione-card__detail-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.btr-prenotazione-card__detail-label svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.btr-prenotazione-card__detail-value {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

.btr-prenotazione-card__detail-value--price {
    color: #27ae60;
    font-size: 18px;
    font-weight: 800;
}

.btr-prenotazione-card__detail-value--warning {
    color: #e74c3c;
    font-weight: 700;
}

/* Actions - Modern 2025 Style */
.btr-prenotazione-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 28px 24px;
    background: transparent;
    border-top: none;
}

.btr-prenotazione-card__action {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: none;
    overflow: hidden;
}

/* Primary Button - Clean Professional Style */
.btr-prenotazione-card__action--primary {
    background: var(--btr-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 151, 197, 0.25);
}

.btr-prenotazione-card__action--primary:hover {
    background: var(--btr-primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 151, 197, 0.35);
}

.btr-prenotazione-card__action--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 151, 197, 0.2);
}

/* Secondary Button - Clean Style */
.btr-prenotazione-card__action--secondary {
    background: var(--btr-bg-subtle);
    color: var(--btr-text-secondary);
    border: 1px solid var(--btr-border);
}

.btr-prenotazione-card__action--secondary:hover {
    background: #ffffff;
    color: var(--btr-primary);
    text-decoration: none;
    border-color: var(--btr-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 151, 197, 0.12);
}

/* Danger Button - Subtle to Bold on Hover */
.btr-prenotazione-card__action--danger {
    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;
    border: 1px solid rgba(231, 76, 60, 0.15);
}

.btr-prenotazione-card__action--danger:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    text-decoration: none;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow:
        0 6px 16px rgba(231, 76, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Empty state - Enhanced */
.btr-prenotazioni-empty {
    text-align: center;
    padding: 80px 24px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    animation: btrSlideInUp 0.5s ease forwards;
}

.btr-prenotazioni-empty__icon {
    color: #bdc3c7;
    margin-bottom: 20px;
    opacity: 0.6;
}

.btr-prenotazioni-empty__icon svg {
    width: 64px;
    height: 64px;
}

.btr-prenotazioni-empty__title {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.btr-prenotazioni-empty__text {
    font-size: 15px;
    color: #7f8c8d;
    margin: 0 0 28px 0;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btr-prenotazioni-empty__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--btr-primary);
    color: white;
    border-radius: var(--btr-radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--btr-transition);
    box-shadow: var(--btr-shadow-md);
}

.btr-prenotazioni-empty__cta:hover {
    background: var(--btr-primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--btr-shadow-lg);
}

/* ============================================
   MODAL CONFERMA ANNULLAMENTO - Enhanced
   ============================================ */

.btr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.btr-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.btr-modal-overlay--visible .btr-modal {
    transform: scale(1) translateY(0);
}

.btr-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.08);
}

.btr-modal__icon--warning {
    color: #e74c3c;
}

.btr-modal__icon--warning svg {
    width: 36px;
    height: 36px;
}

.btr-modal__icon--info {
    background: rgba(52, 152, 219, 0.08);
    color: #3498db;
}

.btr-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 14px 0;
}

.btr-modal__text {
    font-size: 15px;
    color: #7f8c8d;
    text-align: center;
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.btr-modal__actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.btr-modal__btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btr-modal__btn--cancel {
    background: #f0f4f8;
    color: #2c3e50;
}

.btr-modal__btn--cancel:hover {
    background: #e4e9ee;
    transform: translateY(-1px);
}

.btr-modal__btn--confirm {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btr-modal__btn--confirm:hover {
    background: linear-gradient(135deg, #ff6b5b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* ============================================
   ACCESSIBILITY - Preserved & Enhanced
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .btr-recovery-banner,
    .btr-recovery-banner__btn,
    .btr-prenotazione-card,
    .btr-prenotazione-card__detail,
    .btr-prenotazione-card__action,
    .btr-modal-overlay,
    .btr-modal {
        transition: none;
        animation: none;
    }

    .btr-prenotazione-card {
        opacity: 1;
    }

    .btr-prenotazione-card__status--pending::before,
    .btr-prenotazione-card__status--active::before {
        animation: none;
    }
}

/* Focus visible - Enhanced */
.btr-recovery-banner__btn:focus-visible,
.btr-prenotazione-card__action:focus-visible,
.btr-prenotazioni-empty__cta:focus-visible,
.btr-modal__btn:focus-visible {
    outline: 2px solid var(--btr-primary, #0097c5);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btr-recovery-banner {
        border-bottom-width: 3px;
    }

    .btr-recovery-banner__btn--primary,
    .btr-prenotazione-card__action--primary,
    .btr-prenotazioni-empty__cta {
        background: #000;
    }

    .btr-prenotazione-card {
        border-width: 2px;
    }

    .btr-prenotazione-card__status {
        border-width: 2px;
    }
}

/* Responsive - Enhanced */
@media (max-width: 768px) {
    .btr-prenotazioni-list {
        gap: 20px;
    }

    .btr-prenotazione-card__header {
        padding: 16px 20px 14px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .btr-prenotazione-card__title {
        font-size: 16px;
    }

    .btr-prenotazione-card__details {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px 20px;
    }

    .btr-prenotazione-card__detail {
        padding: 10px;
    }

    .btr-prenotazione-card__actions {
        padding: 16px 20px;
        flex-direction: column;
    }

    .btr-prenotazione-card__action {
        width: 100%;
        justify-content: center;
    }

    .btr-modal {
        padding: 24px;
        margin: 16px;
    }

    .btr-modal__actions {
        flex-direction: column;
    }

    .btr-modal__btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .btr-prenotazione-card__details {
        grid-template-columns: 1fr;
    }

    .btr-prenotazioni-empty {
        padding: 48px 20px;
    }
}
