/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to bottom, #eff6ff, #ffffff);
    min-height: 100vh;
    line-height: 1.6;
}

/* Urgent Top Banner */
.urgent-banner {
    background: linear-gradient(to right, #dc2626, #ef4444);
    color: white;
    padding: 8px 12px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.corner-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.corner-icon.left {
    left: 10px;
}

.corner-icon.right {
    right: 10px;
}
/* Add top padding to body to account for fixed banner */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to bottom, #eff6ff, #ffffff);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 40px;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: pulse 2s infinite;
}

.banner-content i {
    width: 16px;
    height: 16px;
}

/* Trust Indicators */
.trust-indicators {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 12px;
}

.trust-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trust-item i {
    width: 12px;
    height: 12px;
}

.trust-item:nth-child(1) i { color: #16a34a; }
.trust-item:nth-child(2) i { color: #2563eb; }
.trust-item:nth-child(3) i { color: #16a34a; }

/* Chat Container */
.chat-container {
    background: white;
    min-height: 100vh;
}

/* Agent Header */
.agent-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    position: sticky;
    top: 40px;
    z-index: 999;
    transition: top 0.3s ease;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    position: relative;
    width: 48px;
    height: 48px;
}

.avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #2563eb;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* this hides image overflow if needed */
}

.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}


.online-indicator {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #16a34a;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: onlineBlink 2s ease-in-out infinite;
}

.online-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite alternate;
}

.agent-details {
    flex: 1;
}

.agent-name {
    font-weight: bold;
    font-size: 16px;
}

.agent-title {
    color: #bfdbfe;
    font-size: 14px;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #86efac;
    margin-top: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Chat Messages */
.chat-messages {
    padding: 12px;
    background: #f9fafb;
    min-height: 80vh;
    padding-bottom: 40px;
}

.message {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.message-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.small-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.small-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.message-content {
    background: white;
    border-radius: 16px;
    border-top-left-radius: 6px;
    padding: 12px;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #f3f4f6;
    font-size: 14px;
    line-height: 1.5;
}

.message-content p {
    margin-bottom: 1px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Message Styling Variants */
.good-news {
    background: linear-gradient(to right, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
}

.congratulations {
    background: linear-gradient(to right, #f0fdf4, #ecfdf5);
    border: 2px solid #16a34a;
}

.urgent {
    background: #fef2f2;
    border: 2px solid #fca5a5;
}

.card-info {
    margin-top: 8px;
    padding: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 12px;
    color: #92400e;
    font-weight: 500;
}

/* Text Highlights */
.highlight-blue { color: #2563eb; }
.highlight-green { color: #16a34a; }
.highlight-red { color: #dc2626; }
.large-text { font-size: 16px; }
.extra-large-text { font-size: 18px; }
.question-text { font-size: 16px; font-weight: 600; }
.congrats-text { font-size: 16px; font-weight: bold; }
.pre-approved { color: #16a34a; font-weight: 600; font-size: 14px; }
.agent-instruction { font-size: 14px; color: #000; }

/* User Messages */
.user-message {
    justify-content: flex-end;
}

.user-message-content {
    background: linear-gradient(to right, #3b82f6, #2563eb);
    color: white;
    border-radius: 16px;
    border-top-right-radius: 6px;
    padding: 12px;
    max-width: 75%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 500;
    font-size: 14px;
}

/* Button Messages */
.button-message {
    align-items: flex-end;
}

.message-spacer {
    width: 32px;
    flex-shrink: 0;
}

.button-container {
    display: flex;
    gap: 8px;
    flex: 1;
}

.answer-btn {
    flex: 1;
    font-weight: bold;
    padding: 20px 24px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
    border: 3px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

.answer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.answer-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.answer-btn:hover::before {
    left: 100%;
}

.answer-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.yes-btn {
    background: linear-gradient(135deg, #059669, #10b981, #047857);
    background-size: 200% 200%;
    color: white;
    border-color: rgba(255,255,255,0.3);
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.yes-btn:hover {
    background: linear-gradient(135deg, #047857, #059669, #10b981);
    background-size: 200% 200%;
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.5);
}

.no-btn {
    background: linear-gradient(135deg, #6b7280, #9ca3af, #4b5563);
    background-size: 200% 200%;
    color: white;
    border-color: rgba(255,255,255,0.3);
    animation: gradientShift 3s ease infinite reverse;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.no-btn:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280, #9ca3af);
    background-size: 200% 200%;
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 15px 35px rgba(107, 114, 128, 0.5);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Call Button */
.call-button-container {
    flex: 1;
}

.call-button {
    width: 100%;
    background: linear-gradient(to right, #ef4444, #dc2626);
    color: white;
    font-weight: bold;
    padding: 16px 24px;
    border-radius: 16px;
    border: 4px solid #fca5a5;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;  /* Removes underline */
    gap: 8px;
}

.call-button:hover {
    transform: scale(1.05);
    background: linear-gradient(to right, #dc2626, #b91c1c);
}

.call-button i {
    width: 20px;
    height: 20px;
}

.call-text {
    text-align: center;
}

.call-main {
    font-size: 18px;
}

.call-number {
    font-size: 14px;
    font-weight: normal;
}

/* Countdown Timer */
.countdown-timer {
    padding: 16px;
    margin: 0 12px 16px;
    background: linear-gradient(to right, #fef2f2, #fef2f2);
    border: 2px solid #fca5a5;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.timer-content {
    text-align: center;
}

.timer-title {
    color: #b91c1c;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

.timer-display {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.timer-digit {
    background: #dc2626;
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 40px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.timer-colon {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #dc2626;
    margin: 0 4px;
}

.timer-subtitle {
    color: #b91c1c;
    font-weight: bold;
    font-size: 16px;
}

.timer-warning {
    color: #dc2626;
    font-weight: 500;
    margin-top: 4px;
    font-size: 14px;
}

/* Disclaimer */
.disclaimer {
    padding: 16px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-top: 40px;
}

.disclaimer-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 12px;
}

.disclaimer-header i {
    width: 12px;
    height: 12px;
}

.disclaimer p {
    line-height: 1.5;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes onlineBlink {
    0%, 100% { 
        background: #16a34a;
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
    }
    50% { 
        background: #22c55e;
        box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.3);
    }
}

@keyframes dotPulse {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    100% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .trust-content {
        gap: 12px;
        font-size: 11px;
    }
    
    .agent-header {
        padding: 12px;
    }
    
    .agent-name {
        font-size: 15px;
    }
    
    .agent-title {
        font-size: 13px;
    }
    
    .chat-messages {
        padding: 8px;
    }
    
    .message-content {
        font-size: 14px;
        padding: 10px;
    }
    
    .answer-btn {
        padding: 18px 16px;
        font-size: 16px;
        min-height: 65px;
        letter-spacing: 0.8px;
    }
    
    .call-button {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .call-main {
        font-size: 18px;
    }
    
    .timer-digit {
        width: 36px;
        height: 44px;
        font-size: 22px;
    }
    
    .timer-colon {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .banner-content {
        font-size: 14px;
        gap: 6px;
    }
    
    .trust-content {
        gap: 8px;
        font-size: 10px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 6px;
    }
    
    .answer-btn {
        font-size: 15px;
        padding: 16px 14px;
        min-height: 60px;
        letter-spacing: 0.6px;
    }
    
    .timer-digit {
        width: 32px;
        height: 40px;
        font-size: 20px;
    }
    
    .timer-colon {
        font-size: 20px;
    }
}