.conversation-offer-modal {
    display: none;
    position: fixed;
    z-index: 1055;
    outline: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.conversation-offer-modal.show {
    display: block;
}

.conversation-offer-modal .modal-dialog {
    position: fixed;
    margin: 0;
    width: 400px;
    max-width: calc(100vw - 30px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: slideInFromTop 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Position modal in top-right on large screens */
@media (min-width: 992px) {
    .conversation-offer-modal .modal-dialog {
        top: 20px;
        right: 20px;
    }
}

/* Center modal on smaller screens */
@media (max-width: 991px) {
    .conversation-offer-modal .modal-dialog {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        animation: slideInCenter 0.3s ease-out;
    }
}

@media (max-width: 576px) {
    .conversation-offer-modal .modal-dialog {
        width: calc(100vw - 20px);
        max-width: none;
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        animation: slideInFromTop 0.3s ease-out;
    }
}

/* Modal Header */
.conversation-offer-modal .modal-header {
    padding: 20px 24px 16px;
    border-bottom: none;
    background: #fff;
    position: relative;
}

.conversation-offer-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.conversation-offer-modal .modal-close:hover {
    background-color: #f5f5f5;
    color: #666;
}

/* Offer Header Content */
.conversation-offer-modal .offer-header {
    margin-bottom: 0;
    margin-right: 40px;
}

.conversation-offer-modal .offer-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.conversation-offer-modal .offer-subtitle {
    font-size: 14px;
    margin-bottom: 4px;
    color: #999;
    line-height: 1.4;
}

.conversation-offer-modal .offer-placeholder {
    font-size: 13px;
    color: #999;
    font-style: italic;
    line-height: 1.4;
}

.conversation-offer-modal .offer-wait-time {
    font-size: 13px;
    color: #999;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.conversation-offer-modal .wait-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Modal Body */
.conversation-offer-modal .modal-body {
    padding: 0;
}

/* Timer Progress Bar */
.conversation-offer-modal .timer-progress-container {
    padding: 0 24px 20px;
}

.conversation-offer-modal .timer-progress-bar {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.conversation-offer-modal .timer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 100%;
}

/* Modal Footer */
.conversation-offer-modal .modal-footer {
    padding: 0 24px 24px;
    border-top: none;
    background: #fff;
    display: flex;
    gap: 12px;
}

.conversation-offer-modal .btn {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.conversation-offer-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.conversation-offer-modal .btn-accept {
    background: #10b981;
    color: white;
}

.conversation-offer-modal .btn-accept:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

.conversation-offer-modal .btn-reject {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.conversation-offer-modal .btn-reject:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.conversation-offer-modal .reject-timer {
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

.conversation-offer-modal .offer-state {
    display: block;
}

/* Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInCenter {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Dark Mode Support */
.dm .conversation-offer-modal .modal-dialog {
    background: #1f2937;
    border: 1px solid #374151;
}

.dm .conversation-offer-modal .modal-header,
.dm .conversation-offer-modal .modal-footer {
    background: #1f2937;
}

.dm .conversation-offer-modal .offer-title {
    color: #f9fafb;
}

.dm .conversation-offer-modal .offer-subtitle,
.dm .conversation-offer-modal .offer-wait-time {
        color: #9ca3af;

}

.dm .conversation-offer-modal .offer-placeholder {
    color: #9ca3af;
}

.dm .conversation-offer-modal .timer-progress-bar {
    background-color: #374151;
}

.dm .conversation-offer-modal .btn-reject {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

.dm .conversation-offer-modal .btn-reject:hover:not(:disabled) {
    background: #4b5563;
}

.dm .conversation-offer-modal .modal-close {
    color: #9ca3af;
}

.dm .conversation-offer-modal .modal-close:hover {
    background-color: #374151;
    color: #f9fafb;
}

/* Focus styles for accessibility */
.conversation-offer-modal .btn:focus,
.conversation-offer-modal .modal-close:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .conversation-offer-modal .modal-dialog {
        border: 2px solid #000;
    }
    
    .conversation-offer-modal .timer-progress-bar {
        border: 1px solid #333;
    }
    
    .conversation-offer-modal .btn {
        border: 2px solid currentColor;
    }
}