/* Modern AI Chatbot Styles */
:root {
    --primary-color: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #dc2626;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Custom AI Chatbot Container */
.custom-ai-chatbot {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Modern Chatbot Trigger */
.chatbot-trigger {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.chatbot-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.chatbot-trigger:hover::before {
    left: 100%;
}

.chatbot-trigger:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

.chatbot-trigger:active {
    transform: translateY(0) scale(0.98);
}

/* Modern Bot Icon */
.chatbot-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.chatbot-trigger:hover .chatbot-icon {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(5deg);
}

.chatbot-icon svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Pulse Animation */
.chatbot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: pulse 2s infinite;
    z-index: 0;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}

/* Chatbot Label */
.chatbot-label {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.025em;
    position: relative;
    z-index: 1;
}

/* Modern Chatbot Container */
.chatbot-container {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 400px;
    height: 600px;
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(20px);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modern Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.chatbot-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.chatbot-clear-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Modern Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-secondary);
    position: relative;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Modern Message Styles */
.message {
    margin-bottom: 20px;
    animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message-content {
    position: relative;
    padding: 16px 20px;
    border-radius: var(--radius-xl);
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

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

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

/* AI Message */
.ai-message .message-content {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    border-bottom-left-radius: var(--radius-sm);
}

/* Initial Choices */
.initial-choices .message-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    padding: 24px;
}

.initial-choices h4 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.initial-choices p {
    margin: 0 0 24px 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Modern Choice Options */
.choice-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.choice-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.choice-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.choice-option:hover::before {
    left: 100%;
}

.choice-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.choice-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    box-shadow: var(--shadow-md);
}

.choice-icon {
    font-size: 28px;
    margin-right: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.choice-option:hover .choice-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.choice-content h5 {
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
}

.choice-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* Modern Chatbot Input */
.chatbot-input {
    padding: 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

#chatbot-input-field {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 24px;
    max-height: 120px;
    background: var(--bg-secondary);
}

#chatbot-input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    background: var(--bg-primary);
}

#chatbot-input-field::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

/* Modern Send Button */
.chatbot-send-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Thinking and Error States */
.message.thinking .message-content {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

.message.error .message-content {
    background: #fef2f2;
    color: var(--error-color);
    border-color: #fecaca;
}

/* Live Chat Interface Styles */
.live-chat-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary);
}

.live-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.live-chat-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.connecting {
    background: var(--warning-color);
}

.status-indicator.connected {
    background: var(--success-color);
    animation: none;
}

.status-indicator.error {
    background: var(--error-color);
    animation: none;
}

.status-text {
    font-size: 14px;
    font-weight: 600;
}

.live-chat-actions {
    display: flex;
    gap: 12px;
}

.btn-minimize, .btn-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-minimize:hover, .btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.live-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: 300px;
    background: var(--bg-secondary);
}

.system-message {
    text-align: center;
    margin-bottom: 20px;
}

.system-message .message-content {
    background: #dbeafe;
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
}

.user-message {
    margin-bottom: 20px;
    text-align: right;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 24px 24px 6px 24px;
    display: inline-block;
    max-width: 80%;
    box-shadow: var(--shadow-md);
}

.agent-message {
    margin-bottom: 20px;
    text-align: left;
}

.agent-message .message-content {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 24px 24px 24px 6px;
    display: inline-block;
    max-width: 80%;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.live-chat-input-container {
    padding: 20px 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.live-chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

#live-chat-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
}

#live-chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    background: var(--bg-primary);
}

#live-chat-input:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
}

#live-chat-send {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

#live-chat-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

#live-chat-send:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Live Chat Form */
.live-chat-form .message-content {
    background: #f0f9ff;
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    padding: 24px;
}

.live-chat-form h4 {
    color: var(--primary-color);
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.live-chat-form .form-group {
    margin-bottom: 20px;
}

.live-chat-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.live-chat-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.live-chat-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.live-chat-connect-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 12px;
    box-shadow: var(--shadow-md);
}

.live-chat-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.live-chat-connect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Live Chat Indicators */
.live-chat-indicator {
    background: var(--success-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 12px;
    animation: pulse 2s infinite;
}

.end-chat-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.end-chat-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

/* Responsive Design */
@media (max-width: 480px) {
    .custom-ai-chatbot {
        bottom: 16px;
        right: 16px;
    }
    
    .chatbot-container {
        width: calc(100vw - 32px);
        right: -8px;
        bottom: 80px;
        height: 500px;
    }
    
    .chatbot-trigger {
        padding: 14px 20px;
    }
    
    .chatbot-label {
        font-size: 14px;
    }
    
    .chatbot-messages {
        padding: 20px;
    }
    
    .chatbot-input {
        padding: 20px;
    }
    
    .choice-option {
        padding: 16px;
    }
    
    .choice-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
        --border-light: #4b5563;
    }
}

/* Accessibility improvements */
.chatbot-trigger:focus,
.chatbot-close:focus,
.chatbot-send-btn:focus,
.choice-option:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
.chatbot-container,
.choice-option,
.chatbot-trigger,
.chatbot-send-btn,
.live-chat-connect-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chat Ended Message Styles */
.message.live-chat-ended {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white !important;
    border: 2px solid #ef4444 !important;
    position: relative;
    overflow: hidden;
    margin: 16px 0;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    animation: slideInUp 0.5s ease-out;
}

.message.live-chat-ended::before {
    content: "🔚";
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    opacity: 0.8;
    z-index: 1;
}

.message.live-chat-ended .message-content {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--radius-lg) !important;
    padding: 16px 20px !important;
    margin: 8px !important;
    backdrop-filter: blur(10px);
    border: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 0;
}

.message.live-chat-ended .message-content p {
    font-weight: 600 !important;
    margin: 0 !important;
    font-size: 1rem !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.live-chat-ended .message-time {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 11px !important;
    margin-top: 8px !important;
    display: block;
}

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

/* Policy Generation Form Styles - Integrated with chat */
.policy-form {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.format-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    flex: 1;
}

.format-option:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.format-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.format-option input[type="radio"]:checked + .format-icon + span {
    color: #667eea;
    font-weight: 600;
}

.format-icon {
    font-size: 1.2em;
}

.format-option input[type="radio"]:checked ~ * {
    color: #667eea;
}

.format-option:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 100px;
}

.form-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.form-actions .btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.form-actions .btn-primary {
    background: #007bff;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #0056b3;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.download-btn i {
    font-size: 1.1em;
}

/* Responsive design for policy form */
@media (max-width: 768px) {
    .format-options {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Survey popup styling */
.survey-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.survey-popup {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: surveySlideIn 0.3s ease-out;
}

@keyframes surveySlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.survey-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.survey-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.survey-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.survey-content {
    padding: 25px;
}

.survey-question {
    margin-bottom: 25px;
}

.survey-question h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.survey-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.survey-option:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.survey-option input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.2);
}

.survey-option input[type="radio"]:checked + .option-text {
    color: #667eea;
    font-weight: 600;
}

.option-text {
    font-size: 14px;
    color: #555;
}

.rating-stars {
    display: flex;
    gap: 5px;
    align-items: center;
}

.rating-stars input[type="radio"] {
    display: none;
}

.rating-stars label {
    font-size: 24px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.rating-stars label:hover,
.rating-stars input:checked + label,
.rating-stars label.selected {
    opacity: 1;
    transform: scale(1.1);
}

.rating-stars label.selected {
    opacity: 1;
    transform: scale(1.1);
}

.rating-stars label.hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.survey-question textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.survey-question textarea:focus {
    outline: none;
    border-color: #667eea;
}

.survey-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 25px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.survey-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.survey-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.survey-actions .btn-secondary:hover {
    background: #5a6268;
}

.survey-actions .btn-primary {
    background: #667eea;
    color: white;
}

.survey-actions .btn-primary:hover {
    background: #5a6fd8;
}