/* ============================================
   PREMIUM E-MAIL MODAL DESIGN
   ============================================ */

.email-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(30, 60, 60, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* Header */
.email-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.email-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3c3c 0%, #2d5555 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(30, 60, 60, 0.2);
}

.email-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.email-modal-close:hover {
    background: #f3f4f6;
    color: #1e3c3c;
    border-color: #1e3c3c;
}

/* Body */
.email-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Field Groups */
.email-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-field-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
}

.email-field-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s;
    background: white;
}

.email-field-input:focus {
    outline: none;
    border-color: #1e3c3c;
    box-shadow: 0 0 0 3px rgba(30, 60, 60, 0.1);
}

.email-field-input::placeholder {
    color: #9ca3af;
}

/* Textarea */
.email-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #1f2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    resize: vertical;
    min-height: 200px;
    transition: all 0.2s;
}

.email-textarea:focus {
    outline: none;
    border-color: #1e3c3c;
    box-shadow: 0 0 0 3px rgba(30, 60, 60, 0.1);
}

/* CC/BCC Toggle */
.email-cc-toggle {
    display: flex;
    gap: 8px;
    padding: 8px 0;
}

.email-toggle-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.email-toggle-btn:hover {
    background: #f9fafb;
    border-color: #1e3c3c;
    color: #1e3c3c;
}

/* Context Section */
.email-context-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.email-context-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* AI Actions */
.email-ai-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.email-ai-btn {
    padding: 10px 20px;
    border: 1px solid #ff6101;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff6101 0%, #ff7b2e 100%);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(255, 97, 1, 0.2);
}

.email-ai-btn:hover {
    background: linear-gradient(135deg, #d14400 0%, #ff6101 100%);
    box-shadow: 0 4px 12px rgba(255, 97, 1, 0.3);
    transform: translateY(-1px);
}

/* Footer */
.email-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.email-btn-primary {
    padding: 12px 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e3c3c 0%, #2d5555 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(30, 60, 60, 0.2);
}

.email-btn-primary:hover {
    background: linear-gradient(135deg, #2d5555 0%, #1e3c3c 100%);
    box-shadow: 0 4px 12px rgba(30, 60, 60, 0.3);
    transform: translateY(-1px);
}

.email-btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.email-btn-secondary:hover {
    background: #f9fafb;
    border-color: #1e3c3c;
    color: #1e3c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .email-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .email-modal-body {
        padding: 20px;
    }
    
    .email-modal-header,
    .email-modal-footer {
        padding: 16px 20px;
    }
    
    .email-context-section .grid {
        grid-template-columns: 1fr;
    }
}

/* Hidden Helper Class */
.hidden {
    display: none !important;
}
