/* Offer detail + native chat modal — see templates/website/modals/redirect_modal.html.
   Two-column grid on >=992px: offer detail | chat. Stacks on mobile. */

.offer-modal .modal-xl {
    max-width: 1140px;
}

.offer-modal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
}

.offer-modal-body {
    padding: 1.75rem 1.75rem 1.5rem;
    background: #fafbfd;
}

.offer-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.offer-modal-close:hover {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
}

/* ---- Banner ---- */
.offer-modal-banner {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.4;
}

.offer-modal-banner.online {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border: 1px solid #34d399;
}

.offer-modal-banner.non-online {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.offer-modal-banner.not-logged {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.offer-modal-banner.discount-code {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #3730a3;
    border: 1px solid #818cf8;
    flex-wrap: wrap;
}

.offer-modal-banner.worldexplorer {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #075985;
    border: 1px solid #38bdf8;
}

.offer-modal-banner .banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.offer-modal-banner .banner-text {
    flex: 1;
    min-width: 0;
}

.offer-modal-banner .banner-text strong {
    display: block;
    font-weight: 700;
    margin-bottom: 0.15rem;
    font-size: 1.05rem;
}

.offer-modal-banner .banner-discount {
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-weight: 700;
    color: #0b2c56;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.offer-modal-banner .banner-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px dashed #818cf8;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-family: ui-monospace, "SF Mono", monospace;
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e1b4b;
}

.offer-modal-banner .banner-copy-btn {
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.offer-modal-banner .banner-copy-btn:hover {
    background: #4338ca;
}

.offer-modal-banner .banner-copy-btn.copied {
    background: #16a34a;
}

.offer-modal-banner .banner-login-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.offer-modal-banner .banner-login-actions a {
    background: #fff;
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.offer-modal-banner .banner-login-actions a:hover {
    background: #fef3c7;
}

/* ---- Grid layout ---- */
.offer-modal-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 991px) {
    .offer-modal-grid {
        grid-template-columns: 1fr;
    }
    .offer-modal-body {
        padding: 1.25rem 1rem 1rem;
    }
}

/* ---- Detail column ---- */
.offer-modal-detail {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.offer-detail-loading,
.offer-detail-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
    text-align: center;
}

.offer-detail-error i {
    font-size: 1.5rem;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.offer-detail-content .detail-hero {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e5e7eb;
    position: relative;
}

.offer-detail-content .detail-hero .detail-id-chip {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 0.85rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.offer-detail-content .detail-body {
    padding: 1rem 1.15rem 1.15rem;
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
}

.offer-detail-content .detail-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bfg-main, #0b2c56);
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.offer-detail-content .detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
}

.offer-detail-content .detail-meta .pill {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}

.offer-detail-content .detail-meta .pill.price {
    background: #ecfdf5;
    color: #065f46;
    font-weight: 600;
}

.offer-detail-content .detail-summary {
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 1rem;
    white-space: pre-line;
}

.offer-detail-content .detail-section {
    margin-bottom: 0.85rem;
}

.offer-detail-content .detail-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.offer-detail-content .detail-section-title i {
    color: #2563eb;
}

.offer-detail-content .detail-section-body {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    white-space: pre-line;
}

/* ---- Chat column ---- */
.offer-modal-chat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    max-height: 560px;
}

.offer-chat-header {
    background: linear-gradient(135deg, #f8d775, #e0a64b);
    color: #6e3c00;
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    border-radius: 14px 14px 0 0;
}

.offer-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: #fafbfd;
}

.offer-chat-empty {
    color: #9ca3af;
    font-size: 0.92rem;
    font-style: italic;
    text-align: center;
    margin: auto 0;
    padding: 1rem 0.5rem;
}

.offer-chat-message {
    max-width: 85%;
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    font-size: 0.93rem;
    line-height: 1.45;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.offer-chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.offer-chat-message.model {
    align-self: flex-start;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.offer-chat-message.system {
    align-self: center;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.85rem;
    font-style: italic;
}

.offer-chat-message strong {
    font-weight: 700;
}

.offer-chat-message a {
    color: inherit;
    text-decoration: underline;
}

.offer-chat-typing {
    padding: 0.4rem 1rem 0.6rem;
    display: flex;
    gap: 4px;
    background: #fafbfd;
}

.offer-chat-typing .dot {
    width: 7px;
    height: 7px;
    background: #9ca3af;
    border-radius: 50%;
    animation: chatDot 1.2s infinite ease-in-out;
}

.offer-chat-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.offer-chat-typing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatDot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.offer-chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0 0 14px 14px;
}

.offer-chat-form input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.offer-chat-form input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.offer-chat-send {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.offer-chat-send:hover { transform: translateY(-1px); }
.offer-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.offer-chat-rate-info {
    padding: 0 1rem 0.45rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
    min-height: 1rem;
}

/* ---- CTA bar ---- */
.offer-modal-cta {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.offer-modal-tariffe-link {
    color: #2563eb;
    font-size: 0.92rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.offer-modal-tariffe-link:hover {
    text-decoration: underline;
}

.offer-modal-primary {
    margin-left: auto;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    transition: all 0.15s ease;
}

.offer-modal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.offer-modal-primary.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.offer-modal-primary.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* Booking-submitted confirmation card replaces the chat scroll body. */
.offer-chat-booked {
    margin: auto 0;
    text-align: center;
    padding: 1.25rem;
    background: #ecfdf5;
    border: 1px solid #34d399;
    border-radius: 12px;
    color: #065f46;
}

.offer-chat-booked i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #10b981;
}

.offer-chat-booked h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.offer-chat-booked p {
    font-size: 0.9rem;
    margin: 0;
}
