:root {
    --primary: #cd0046;
    --primary-dark: #a80039;
    --primary-light: #ff1a6b;
    --dark: #000000;
    --light: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f7;
    color: var(--dark);
}

.container {
    max-width: 1400px;  /* Increased container width */
    padding: 0 30px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--light);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5 {
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:active, 
.btn:focus {
    transform: translateY(1px);
    box-shadow: none !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:disabled {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(1px);
}

.btn-success {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--light);
    transform: translateY(-1px);
}

.btn-success:active,
.btn-success:focus,
.btn-success.sent,
.btn-success:disabled {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light) !important;
    transform: translateY(1px);
}

/* Add this to prevent button color change during loading */
.btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Navbar Styles */
.navbar {
    background-color: var(--dark) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--light) !important;
}

.nav-link {
    color: var(--light) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Form Styles */
.form-control {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(205, 0, 70, 0.1);
}

/* Page Headers */
h2.mb-4 {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.75rem;
    margin-bottom: 1.5rem !important;
}

/* Layout Adjustments */
.row {
    margin-left: -20px;
    margin-right: -20px;
}

.col-md-6 {
    padding-left: 20px;
    padding-right: 20px;
}

/* Chat Container Adjustments */
.chat-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* List Group Styles */
.list-group-item {
    border: none;
    border-radius: 8px !important;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 6px;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* Animation for updates */
@keyframes highlight {
    0% { background-color: rgba(205, 0, 70, 0.1); }
    100% { background-color: transparent; }
}

.updated {
    animation: highlight 1s ease-out;
}

/* Chat Interface Styles */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    background-color: white;
    margin-bottom: 20px;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
}

/* Email History Styles */
.email-list {
    list-style: none;
    padding: 0;
}

.email-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
}

/* Form Styles */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Add styles for outline primary button */
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: var(--light);
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-outline-primary:active,
.btn-outline-primary:focus,
.btn-outline-primary:disabled {
    color: var(--light) !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    transform: translateY(1px);
}

/* Compose V3 Specific Styles */
.chat-container {
    max-width: 100%;
    height: calc(100vh - 80px);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-section {
    /* position: absolute; */
    left: 0;
    right: 0;
    height: calc(100vh - 25vh);
    top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-wrapper {
    width: 80%;
    max-width: 1000px;
}

.chat-input-container {
    margin-bottom: 30px;
}

.chat-messages {
    display: none;
    margin-top: 30px;
}

.chat-messages.visible {
    display: block;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: var(--light);
}

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

.chat-message {
    margin: 0.5rem 0;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.95rem;
}

.user-message {
    background-color: var(--primary);
    color: var(--light);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.assistant-message {
    background-color: var(--gray-200);
    color: var(--dark);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Email Preview Styles */
.email-preview-section {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-preview-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.email-preview {
    background-color: var(--light);
    border-radius: 12px;
    padding: 1.25rem;
}

.email-field {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.email-label {
    color: var(--gray-600);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-field {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Header Section Styles */
.header-section-wrapper {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 2rem;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Welcome Text Styles */
.welcome-text {
    text-align: center;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

.welcome-text .subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    font-style: italic;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Input Group Styles */
.input-group {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

textarea#user-input {
    border-radius: 12px;
    padding: 15px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.3s ease;
    width: calc(100% - 130px);
    background-color: white;
}

/* Typing Indicator */
#typing-indicator {
    display: inline-block;
    padding: 8px 16px;
    min-width: 60px;
    background-color: var(--gray-200);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.typing {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 16px;
}

.typing .dot {
    width: 6px;
    height: 6px;
    background: var(--gray-600);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* Modal Styles */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Login Page Styles */
.login-container {
    /* min-height: 100vh; */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* background-color: var(--gray-100); */
}

.login-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 1.5rem;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    background: var(--light);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-form h2 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-form .text-muted {
    font-size: 0.95rem;
}

.login-form .form-label {
    font-weight: 500;
    font-size: 0.95rem;
}

.login-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.login-form .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.auth-form a {
    text-decoration: none;
    font-weight: 500;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* Draft Success Modal Styles */
#draftSuccessModal .modal-content {
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

#draftSuccessModal .modal-header {
    background-color: var(--primary);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#draftSuccessModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#draftSuccessModal .modal-body {
    padding: 1.5rem;
}

#draftSuccessModal .modal-body p {
    margin-bottom: 0.5rem;
}

#draftSuccessModal .modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

#draftSuccessModal .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.spinner-wrapper {
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.spinner-text {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Email Sent Modal Styles */
#emailSentModal .modal-content {
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

#emailSentModal .modal-header {
    background-color: var(--primary);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#emailSentModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#emailSentModal .modal-body {
    padding: 1.5rem;
}

#emailSentModal .modal-body p {
    margin-bottom: 0.5rem;
}

#emailSentModal .modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

#emailSentModal .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

/* Editable Preview Styles */
.preview-field.editable {
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 8px;
    min-height: 24px;
    cursor: text;
    transition: all 0.2s ease;
}

.preview-field.editable:hover {
    border-color: var(--primary);
}

.preview-field.editable:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(205, 0, 70, 0.1);
}

/* Edit Modal Styles */
#editModal .btn {
    text-align: left;
    padding: 1rem;
}

#editModal .btn small {
    margin-top: 0.5rem;
}

#editModal .btn i {
    width: 20px;
    text-align: center;
}

/* Add these styles to your existing CSS */
.list-group-item.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light) !important;
}

.list-group-item {
    color: var(--dark);
    padding: 12px 20px;
}

.list-group-item:hover:not(.active) {
    background-color: var(--gray-100);
    color: var(--primary);
}

.list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Add a subtle transition for smoother hover effects */
.list-group-item {
    transition: all 0.2s ease;
}
  