/* Antmailer CSS - Email Management System Styles */

/* ========================================
   CUSTOMIZATION GUIDE
   ======================================== */

/* To change the main header and tab background colors, look for:
   Line ~545: .antmailer-header { background-color: transparent !important; }
   Line ~556: .antmailer-tabs { background-color: transparent !important; }
   
   To change tab border colors, look for:
   Line ~550-552: borders are set to none
   Line ~561-562: borders are set to none
   
   To change hover colors, look for:
   Line ~616: background-color: #bbdefb !important;
*/

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 0;
}

.hero-section .display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Demo Section */
.demo-section {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.demo-section .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.demo-section .card:hover {
    transform: translateY(-2px);
}

.demo-section .card-header {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
}

/* Email Editor Styles */
.email-editor {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    min-height: 300px;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: white;
    position: relative;
    overflow-y: auto;
}

.email-editor:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

.email-editor[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: #6c757d;
    pointer-events: none;
}

/* Email Editor Toolbar */
.email-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
}

.email-toolbar button {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.email-toolbar button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.email-toolbar button.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.email-toolbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-toolbar .separator {
    width: 1px;
    background: #dee2e6;
    margin: 0 4px;
}

/* Email Preview */
.email-preview-area {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 0.375rem;
}

.email-preview {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: black !important;
    background: black;
}

    .email-preview .email-header {
        font-size: 13px;
        color: black !important;
        
    }

/* Note: .email-preview .email-body is defined later with scrolling styles */

.email-preview .email-meta {
    color: black !important;
}

.email-preview .email-meta strong {
    color: black !important;
}

.email-preview .email-meta .col-9 {
    color: black !important;
}

/* Email action buttons styling */
.email-actions {
    border-bottom: none;
    padding-bottom: 0;
}

/* Hide buttons when printing */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Email list toolbar styling */
.email-list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: white;
    border-bottom: 1px solid #dee2e6;
}

.toolbar-left {
    display: flex;
    align-items: center;
}

.toolbar-right {
    display: flex;
    align-items: center;
}

/* Tutorial Section */
.tutorial-section {
    padding: 60px 0;
}

.tutorial-section .nav-pills .nav-link {
    color: #495057;
    border-radius: 0.5rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.tutorial-section .nav-pills .nav-link:hover {
    background: #e9ecef;
    color: #212529;
}

.tutorial-section .nav-pills .nav-link.active {
    background: #0d6efd;
    color: white;
}

.tutorial-section .tab-content {
    min-height: 600px;
}

.tutorial-section .card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tutorial-section .accordion-button {
    font-weight: 600;
    color: #495057;
}

.tutorial-section .accordion-button:not(.collapsed) {
    background: #e7f3ff;
    color: #0d6efd;
}

.tutorial-section pre {
    font-size: 13px;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
}

.tutorial-section code {
    color: #d63384;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Quick Start Section */
.quick-start-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quick-start-section .card {
    border: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Email Management Tables */
.email-table {
    font-size: 14px;
}

.email-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.email-table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.email-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.email-status.status-sent {
    background: #d1edff;
    color: #0d6efd;
}

.email-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

.email-status.status-draft {
    background: #fff3cd;
    color: #856404;
}

.email-status.status-received {
    background: #d4edda;
    color: #155724;
}

/* Email Detail View */
.email-detail {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.email-detail .email-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

.email-detail .email-body {
    position: relative; /* For absolute positioned children */
    padding: 0; /* Remove padding for iframe */
    height: 500px; /* Fixed height for email detail */
    overflow: hidden; /* No scrolling on container */
    background: #fff;
}

/* The iframe is wrapped in an absolute positioned div, so no need for specific iframe styles here */

.email-detail .email-meta {
    font-size: 14px;
    color: black !important;
    margin-bottom: 10px;
}

.email-detail .email-subject {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

/* Form Styles */
.email-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.email-form .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

.email-form .was-validated .form-control:valid {
    border-color: #198754;
}

.email-form .was-validated .form-control:invalid {
    border-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .email-toolbar {
        flex-direction: column;
        gap: 8px;
    }
    
    .email-toolbar button {
        width: 100%;
    }
    
    .tutorial-section .nav-pills {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tutorial-section .nav-pills .nav-link {
        margin-right: 8px;
        margin-bottom: 0;
    }
    
    .email-table {
        font-size: 12px;
    }
    
    .email-detail .email-subject {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .demo-section .card {
        margin-bottom: 20px;
    }
    
    .email-preview-area {
        min-height: 200px;
    }
    
    .tutorial-section pre {
        font-size: 11px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.border-start-primary {
    border-left: 4px solid #0d6efd !important;
}

.border-start-success {
    border-left: 4px solid #198754 !important;
}

.border-start-danger {
    border-left: 4px solid #dc3545 !important;
}

.border-start-warning {
    border-left: 4px solid #ffc107 !important;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .email-editor {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .email-toolbar {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .email-toolbar button {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .email-toolbar button:hover {
        background: #718096;
    }
    
    .email-preview-area {
        background: #2d3748;
        color: #e2e8f0;
    }
}

/* ========================================
   ANTMAILER TAB-BASED INTERFACE STYLES
   ======================================== */

/* Main Container */
.antmailer-container {
    height: calc(95vh - 56px); /* Increased to use more available space */
    max-height: calc(95vh - 56px);
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: transparent;
    border-top: none !important;
    overflow: hidden;
}

/* Header and Tab Navigation Section */
.antmailer-header {
    background-color: transparent !important; /* Header background color - transparent */
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.antmailer-tabs {
    background-color: transparent !important; /* Tabs background color - transparent */
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-left: none !important;
    border-right: none !important;
}

/* Header-specific styling */
.antmailer-header {
    padding: 0px !important;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    border-bottom: none !important;
}

/* Defensive CSS - ensure proper layout on desktop */
@media (min-width: 577px) {
    .antmailer-header .row {
        flex-direction: row !important;
    }
    
    .antmailer-header .col-md-6 {
        width: 50% !important;
        margin-bottom: 0 !important;
    }
}



/* Tab Navigation-specific styling */
.antmailer-tabs {
     /* No additional styling needed */
}

/* Ensure no gaps between header and tabs */
.antmailer-header + .antmailer-tabs {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Tab Navigation Styling */
.antmailer-tabs .nav-tabs {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    margin-bottom: 0;
}

.antmailer-tabs .nav-tabs .nav-link {
    border-top: 1px solid #d3d3d3 !important;
    border-left: 1px solid #d3d3d3 !important;
    border-right: 1px solid #d3d3d3 !important;
    border-bottom: none !important;
    border-radius: 0.375rem 0.375rem 0 0;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 12px;
    margin-right: 0px;
    margin-bottom: -1px;
    white-space: nowrap;
    background: transparent;
    transition: all 0.15s ease;
    outline: none !important;
}

    .antmailer-tabs .nav-tabs .nav-link.active {
        border-top: 1px solid #fff !important;
        border-left: 1px solid #fff !important;
        border-right: 1px solid #fff !important;
        
    }

    .antmailer-tabs .nav-tabs .nav-link:focus {
        border-top: none !important;
        outline: none !important;
        box-shadow: none !important;
        
    }

/* Non-active tab styling */
.nav-tabs .nav-link:not(.active) {
    background-color: #0b5ed7 !important; /* Darker blue background */
    color: #f8f9fa !important; /* White text */
    border-color: #dee2e6 !important;
}

.nav-tabs .nav-link:not(.active):hover {
    background-color: #ffffff !important; /* Slightly darker blue on hover */
    color: #000000 !important;
    border-color: #fff !important;
    text-decoration: none;
}

/* Tab active state override */
.nav-tabs .nav-link.active {
    background-color: #ffffff !important;
    border-color: #dee2e6 #dee2e6 #dee2e6 #dee2e6 !important;
    color: #0d6efd !important;
    font-weight: 600 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    
}

/* Switch Account button font weight to match tabs */
#emailAccountDropdown {
    font-weight: 600 !important;
}

/* Email preview pane metadata to match email list sender names exactly */
.email-meta {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    color: #212529 !important;
}

/* Override the strong tags in email metadata to not be double-bold */
.email-meta strong {
    font-weight: 600 !important; /* Same as email list, not bolder */
}

/* The actual email values (not labels) should match email list exactly */
.email-meta .col-11 {
    font-weight: 600 !important;
}

/* Remove gaps between metadata rows for table-like appearance */
.email-meta .row {
    margin-left: 0 !important; /* Remove Bootstrap row negative margin */
    margin-right: 0 !important; /* Remove Bootstrap row negative margin */
    margin-bottom: 0 !important; /* Remove mb-1 class gap */
}

    .email-meta .col-1 {
        padding: 9px 3px 9px 6px !important; /* 9px top/bottom (increased from 8px), 3px right, 6px left */
        background-color: #f8f9fa !important; /* Same light blue as Antiot header */
        margin: 0 !important; /* Remove any margins */
        border: 1px solid #dee2e6 !important; /* Bootstrap gray border */
        border-right: none !important; /* Remove right border to connect with next cell */
        border-bottom: none !important; /* Remove bottom border to prevent doubling */
    }

    .email-meta .col-11 {
        padding: 9px 6px 9px 8px !important; /* 9px top/bottom (increased from 8px), 6px right, 8px left */
        background-color: #ffffff !important; /* White background */
        margin: 0 !important; /* Remove any margins */
        border: 1px solid #dee2e6 !important; /* Bootstrap gray border */
        border-left: none !important; /* Remove left border to connect with previous cell */
        border-bottom: none !important; /* Remove bottom border to prevent doubling */
        word-wrap: break-word !important; /* Allow long words to break */
        overflow-wrap: break-word !important; /* Alternative property for better support */
        word-break: break-word !important; /* Force break long email addresses */
    }

    /* Add bottom border only to the last row */
    .email-meta .row:last-child .col-1,
    .email-meta .row:last-child .col-11 {
        border-bottom: 1px solid #dee2e6 !important;
    }

/* Keep email body content as originally intended - remove bold styling */

/* Select All label - match email list item styling */
.email-list-header .form-check-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    color: #212529 !important;
}

/* Override all Bootstrap primary buttons to use darker blue */
.btn-primary {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}

.btn-primary:hover {
    background-color: #0a58ca !important;
    border-color: #0a53be !important;
}

.btn-primary:focus {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5) !important;
}

.btn-primary:active {
    background-color: #0a58ca !important;
    border-color: #0a53be !important;
}

/* ========================================
   ANTMAILER FORM AND UI ENHANCEMENTS
   ======================================== */

/* Enhanced checkbox styling */
.form-check-input {
    border: 1px solid #000000 !important; /* Fine black border */
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.form-check-input:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Date-time display styling */
.date-time-display {
    font-size: 0.75rem; /* Smaller font size */
    text-align: right; /* Right aligned */
    line-height: 1.1;
    margin-top: 0 !important;
    white-space: nowrap;
}

/* Email item enhancements */
.email-item .form-check {
    min-width: 20px;
}

.email-date {
    min-width: 80px;
    flex-shrink: 0;
    margin-top: 0 !important; /* restore group position */
    padding-top: 0 !important;
}

/* Nudge time/date upward slightly within the right column */
.email-item .email-date .date-time-display {
    margin-top: 0 !important; /* no extra shift */
}

/* Tighter spacing between day, date, and time lines without moving the whole group */
.email-item .email-date .email-list-day,
.email-item .email-date .email-list-date,
.email-item .email-date .email-list-time {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.05 !important;
}

/* Add a little separation between date and time */
.email-item .email-date .email-list-date { margin-top: 3px !important; }
.email-item .email-date .email-list-time { margin-top: 3px !important; }



/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.antmailer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0; /* Important for flex containers */
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

.antmailer-content .tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    background: #ffffff;
}

.antmailer-content .tab-pane {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.antmailer-content .tab-pane.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.antmailer-content .tab-pane.show.active {
    display: flex !important;
    background: #ffffff;
}

.tab-toolbar {
    background: #ffffff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
    width: 100%;
}

.tab-content-area {
    flex: 1;
    
    overflow-y: auto;
    width: 100%;
    min-height: 0;
    background: #ffffff;
}

/* Compose Form Styles */
.compose-form {
    width: 100%;
    max-width: none;
}

.compose-form .form-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #212529 !important;
    line-height: 1.2 !important;
    background-color: #edf2fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
    padding: 6px 6px 6px 6px !important;
    margin: 0 !important;
    display: inline-block;
    width: 80px;
}

.compose-form .form-control {
    width: 100%;
}

/* Match compose form styling to inbox metadata table */
    #send-pane .compose-form .input-group-text,
    .tab-pane .compose-form .input-group-text,
    .compose-form .input-group-text {
        background-color: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
        border-right: none !important;
        border-radius: 0 !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #212529 !important;
        line-height: 1.2 !important;
        padding: 9px 3px 9px 6px !important; /* Increased vertical padding */
        width: 80px;
        justify-content: flex-start;
    }

/* Remove gaps between compose form rows for table-like appearance */
.compose-form .mb-1 {
    margin-bottom: 0 !important;
}

/* Prevent border doubling between rows like in inbox */
#send-pane .compose-form .mb-1:not(:first-child) .input-group-text,
.tab-pane .compose-form .mb-1:not(:first-child) .input-group-text,
.compose-form .mb-1:not(:first-child) .input-group-text {
    border-top: none !important;
}

#send-pane .compose-form .mb-1:not(:first-child) .form-control,
.tab-pane .compose-form .mb-1:not(:first-child) .form-control,
.compose-form .mb-1:not(:first-child) .form-control {
    border-top: none !important;
}

/* Remove bottom border from last metadata row (Attach Files) to prevent clash with rich-tagger */
#send-pane .compose-form .mb-1:last-child .input-group-text,
#send-pane .compose-form .mb-1:last-child .form-control,
.tab-pane .compose-form .mb-1:last-child .input-group-text,
.tab-pane .compose-form .mb-1:last-child .form-control,
.compose-form .mb-1:last-child .input-group-text,
.compose-form .mb-1:last-child .form-control {
    border-bottom: none !important;
}

/* Remove top border from rich-tagger toolbar when it follows the compose form */
.compose-form + #compose-editor .rte-toolbar,
#compose-editor .rte-toolbar {
    border-top: none !important;
}

#send-pane .compose-form .form-control,
.tab-pane .compose-form .form-control,
.compose-form .form-control {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-left: none !important;
    border-radius: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #212529 !important;
    line-height: 1.2 !important;
    padding: 9px 6px 9px 8px !important; /* Increased vertical padding */
}

.compose-form .form-control:focus {
    background-color: #ffffff !important;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25) !important;
}

/* Rich Tagger editor integration styles */
#compose-editor .rte-editor {
    min-height: 300px;
    width: 100%;
    border-radius: 0.375rem;
}

#compose-editor .rte-toolbar {
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Darker button styling for better visibility in antmailer */
#compose-editor .rte-toolbar-btn {
    border: 1px solid #333333 !important;
    color: #333333 !important;
    background-color: white !important;
}

#compose-editor .rte-toolbar-btn:hover {
    background-color: #f0f0f0 !important;
    border-color: #000000 !important;
    color: #000000 !important;
}

#compose-editor .rte-toolbar-btn.active {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}

/* Ensure dropdown toggle arrows are also dark */
#compose-editor .rte-toolbar-btn.dropdown-toggle::after {
    border-top-color: #333333 !important;
}

.attachments-container {
    min-height: 30px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* Three-pane Email Layout */
.email-three-pane {
    display: flex;
    height: 100%;
    gap: 1px;
}

.email-list-pane {
    width: 390px;
    min-width: 330px;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.email-preview-pane {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent entire pane from scrolling */
}

.email-list-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-list {
    flex: 1;
    overflow-y: auto;
}

.email-preview {
    flex: 1;
    padding: 0;
    overflow: hidden; /* Changed from auto to hidden */
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Fixed email header (buttons and metadata) */
.email-preview .email-header {
    flex-shrink: 0;
    padding: 15px;
    background: #fff;
    border-bottom: none;
    overflow-y: auto; /* Allow scrolling if metadata is too long */
    max-height: 50%; /* Limit header to half the preview pane */
}

/* Scrollable email body */
.email-preview .email-body {
    position: relative; /* For absolute positioned children */
    flex: 1;
    padding: 0; /* Remove padding for iframe */
    overflow: hidden; /* No scrolling on container */
    background: #fff;
    min-height: 400px; /* Ensure minimum height for iframe content */
}

/* The iframe is wrapped in an absolute positioned div, so no need for specific iframe styles here */

/* Email metadata action icons */
.email-meta .bi-person-fill-slash,
.email-meta .bi-person-fill-add {
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.email-meta .bi-person-fill-slash:hover,
.email-meta .bi-person-fill-add:hover {
    transform: scale(1.2);
    opacity: 1;
}

.email-meta .bi-person-fill-slash:active,
.email-meta .bi-person-fill-add:active {
    transform: scale(0.95);
}

/* Email List Item Styles */
.email-item {
    padding: 12px 15px;
    border-bottom: 1px solid #c0c0c0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: #f5f9ff; /* Soft blue-tinted background for inbox items */
}

.email-item:hover {
    background: #ffffff; /* White hover background */
}

.email-item.selected {
    background: #fff;
    border-left: 3px solid #dc3545; /* Danger red for selected */
}

/* Keyboard focus state matches selected styling */
.email-item:focus {
    border-left: 3px solid #0b5ed7;
    outline: none;
}

.email-item .email-from {
    font-weight: 600;
    color: #212529;
    font-size: 12px; /* Smaller text */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px; /* Prevent overflow */
}

.email-item .email-address {
    color: #0d6efd; /* Bootstrap primary blue */
    font-size: 10px; /* Even smaller for email address */
    line-height: 1.2;
    margin: 4px 0 2px 0; /* Slightly reduced space above */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px; /* Match subject line width */
}

.email-item .email-subject {
    color: #000000;
    font-size: 11px; /* Smaller text */
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px; /* Roughly 30 characters including spaces */
    cursor: default; /* Remove help cursor */
}

.email-item .email-preview-text {
    display: block;
    color: #6c757d;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.email-item .email-date {
    color: #000000;
    font-size: 10px; /* Smaller text */
    text-align: right;
}

.email-item .email-size {
    font-size: 9px !important; /* slightly smaller than time */
    line-height: 1 !important;
    font-weight: 400;
    margin-top: 4px; /* add a bit of space above */
}

.email-item .email-size.size-kb {
    color: #198754; /* success green */
}

.email-item .email-size.size-mb {
    color: #dc3545; /* danger red */
}

.email-item .date-red {
    color: #000000; /* Full black */
}

.email-item .time-green {
    color: #000000; /* Full black */
}

/* Attachment notice styling */
.email-attachments {
    font-size: 11px; /* Matches email subject font size in left pane */
    color: #dc3545; /* Bootstrap danger red */
    margin-top: 2px;
}

/* Ensure paperclip icon matches success green, overriding inline styles */
.email-attachments .bi-paperclip {
    color: #dc3545 !important; /* Override inline blue to danger red */
}

.email-attachments .bi-paperclip {
    font-size: 11px; /* Matches attachment text size */
}


/* Button Hover Effects */
.tab-toolbar .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Contacts Container */
.contacts-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Drafts Container */
.drafts-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Sent Container */
.sent-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Deleted Container */
.deleted-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Junk Container */
.junk-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Blocked Container */
.blocked-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Force full width for all child elements */
.antmailer-container *,
.antmailer-content *,
.tab-content-area * {
    box-sizing: border-box;
}

.antmailer-container .row {
    margin-left: 0;
    margin-right: 0;
}

.antmailer-container .col-md-6,
.antmailer-container .col-md-4,
.antmailer-container .col-md-2 {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override Bootstrap container limits */
.antmailer-container {
    max-width: none !important;
    width: 100% !important;
}

/* Responsive Design for Tab Interface */
/* Mobile-only responsive rules - more restrictive to prevent desktop triggering */
@media (max-width: 768px) and (orientation: portrait), (max-width: 576px) {
    .email-three-pane {
        flex-direction: column !important;
    }
    
    .email-list-pane {
        width: 100% !important;
        min-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #dee2e6;
        max-height: 300px;
    }
    
    .antmailer-container {
        height: auto !important;
        max-height: none !important;
    }
    
    .antmailer-tabs .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-left: 0;
        padding-right: 0;
    }
    
    .antmailer-tabs .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 14px;
        margin-right: 1px;
    }
    
    .antmailer-content {
        margin: 0;
    }
    
    .antmailer-header .px-3,
    .antmailer-tabs .px-3,
    .antmailer-content .px-3 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* Separate media query for header layout - only trigger on very small screens */
@media (max-width: 576px) {
    .antmailer-header .row {
        flex-direction: column !important;
    }
    
    .antmailer-header .col-md-6 {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .tab-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 8px 10px;
    }
    
    .tab-toolbar > * {
        margin-bottom: 5px;
    }
    
    .tab-toolbar .ms-auto {
        margin-left: 0 !important;
    }
    
    .tab-content-area {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .antmailer-header .row > div {
        margin-bottom: 10px;
    }
    
    .compose-form .row .col-md-6 {
        margin-bottom: 15px;
    }
    
    .email-item {
        padding: 8px 10px;
    }
    
    .email-three-pane {
        flex-direction: column !important;
    }
    
    .email-list-pane {
        width: 100% !important;
        min-width: 100% !important;
        border-right: none !important;
        max-height: 250px;
    }
    
    .antmailer-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .email-item .email-from {
        font-size: 13px;
        max-width: 180px; /* Reduced from 220px for mobile */
    }
    
    .email-item .email-address {
        max-width: 180px; /* Reduced from 220px for mobile */
    }
    
    .email-item .email-subject {
        font-size: 10px; /* Match email address size for mobile */
        max-width: 180px; /* Reduced from 220px for mobile */
    }
}

/* Custom Button Styling */
.custom-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
}

/* Attachments Input Group Styling */
.compose-form .input-group {
    flex-wrap: nowrap !important;
}

.compose-form .input-group .form-control {
    min-width: 0 !important;
    flex: 1 !important;
}

.compose-form .input-group .btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.compose-form .input-group-text {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-right: none !important;
    border-radius: 0 !important;
    color: #212529 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    padding: 6px 3px 6px 6px !important;
    min-width: 80px !important;
    justify-content: flex-start !important;
}

.compose-form .form-control {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-left: none !important;
    border-radius: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #212529 !important;
    line-height: 1.2 !important;
    padding: 6px 6px 6px 8px !important;
}

.compose-form .form-control:focus {
    background-color: #ffffff !important;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25) !important;
    color: #212529 !important;
    font-weight: 600 !important;
}

.compose-form .form-control::placeholder {
    color: #6c757d !important;
    font-weight: normal !important;
    opacity: 0.7 !important;
}

#attachments-list .badge {
    font-weight: normal !important;
}

/* Force all compose inputs to stay black text - override Chrome autofill */
#compose-to,
#compose-cc,
#compose-bcc,
#compose-subject,
.compose-form input,
.compose-form input[type="email"],
.compose-form input[type="text"] {
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    text-decoration: none !important;
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

#compose-to:valid,
#compose-cc:valid,
#compose-bcc:valid,
#compose-subject:valid,
.compose-form input:valid,
.compose-form input[type="email"]:valid,
.compose-form input[type="text"]:valid {
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    text-decoration: none !important;
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

#compose-to:focus,
#compose-cc:focus, 
#compose-bcc:focus,
#compose-subject:focus,
.compose-form input:focus,
.compose-form input[type="email"]:focus,
.compose-form input[type="text"]:focus {
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    text-decoration: none !important;
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

#compose-to:not(:placeholder-shown),
#compose-cc:not(:placeholder-shown),
#compose-bcc:not(:placeholder-shown),
#compose-subject:not(:placeholder-shown),
.compose-form input:not(:placeholder-shown),
.compose-form input[type="email"]:not(:placeholder-shown),
.compose-form input[type="text"]:not(:placeholder-shown) {
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    text-decoration: none !important;
    background-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

/* Additional override for Chrome autofill */
#compose-to:-webkit-autofill,
#compose-cc:-webkit-autofill,
#compose-bcc:-webkit-autofill,
#compose-subject:-webkit-autofill,
.compose-form input:-webkit-autofill {
    -webkit-text-fill-color: #212529 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    color: #212529 !important;
    background-color: #ffffff !important;
}

/* Active tab styling with 1px gray borders */
.nav-tabs .nav-link.active {
    border-color: #d3d3d3 #d3d3d3 #ffffff #d3d3d3 !important;
    border-top: 1px solid #d3d3d3 !important;
    border-left: 1px solid #d3d3d3 !important;
    border-right: 1px solid #d3d3d3 !important;
    border-bottom: 1px solid #ffffff !important;
    position: relative !important;
    z-index: 10 !important;
}

.antmailer-tabs .nav-tabs .nav-link.active {
    border-top: 1px solid #d3d3d3 !important;
    border-left: 1px solid #d3d3d3 !important;
    border-right: 1px solid #d3d3d3 !important;
    border-bottom: 1px solid #ffffff !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Content area top border to continue tab border */
.antmailer-content {
    border-top: 1px solid #d3d3d3 !important;
}

.custom-btn.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.custom-btn.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.custom-btn.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.custom-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Print Styles */
@media print {
    .hero-section,
    .demo-section,
    .tutorial-section,
    .quick-start-section {
        display: none !important;
    }
    
    .email-detail {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .email-detail .email-header {
        background: #f9f9f9;
    }
    
    .antmailer-header,
    .antmailer-tabs,
    .tab-toolbar {
        display: none !important;
    }
}

/* Contact Row Styles */
.contact-row {
    transition: all 0.3s ease;
}

.contact-row:hover .contact-summary {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-summary {
    background: white;
    transition: box-shadow 0.3s ease;
    min-height: 60px;
}

.contact-summary:hover {
    background: #f8f9fa;
}

.contact-name strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-actions .btn {
    white-space: nowrap;
    font-size: 0.875rem;
}

.contact-details {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.contact-details.show {
    display: block !important;
}

.contact-details .row {
    margin: 0;
}

.contact-details .col-md-6 {
    padding: 0.5rem;
}

.contact-details h6 {
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.contact-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-details .text-muted {
    font-style: italic;
}

/* Responsive adjustments for contact rows */
@media (max-width: 768px) {
    .contact-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .contact-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .contact-actions .btn {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .contact-details .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Search Row Styles (Shared between Inbox and Contacts) */
.contacts-search-row {
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.contacts-search-row.show {
    display: block !important;
}

.contacts-search-row .form-control {
    border-color: #ced4da;
}

.contacts-search-row .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.contacts-search-row .btn {
    border-left: 0;
    font-size: 0.875rem;
}

/* Inbox Search Row Styles */
.inbox-search-row {
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.inbox-search-row.show {
    display: block !important;
}

.inbox-search-row .form-control {
    border-color: #ced4da;
}

.inbox-search-row .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.inbox-search-row .btn {
    border-left: 0;
    font-size: 0.875rem;
}

.search-results-header {
    animation: slideIn 0.3s ease;
}

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

/* ========================================
   ANTMAILER DEDICATED BUTTON STYLES
   ======================================== */

/* Base Antmailer Button Style - Override Bootstrap conflicts */
.antmailer-btn {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    text-align: center;
    text-decoration: none !important;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.375rem !important;
    transition: all 0.15s ease-in-out !important;
    letter-spacing: 0.025em !important;
    white-space: nowrap;
    margin: 0.125rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.antmailer-btn:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.antmailer-btn:hover {
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.antmailer-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.antmailer-btn:disabled {
    opacity: 0.65 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Primary Button */
.antmailer-btn-primary {
    color: #ffffff !important;
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
}

.antmailer-btn-primary:hover {
    color: #ffffff !important;
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

.antmailer-btn-primary:focus {
    color: #ffffff !important;
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    box-shadow: 0 0 0 0.2rem rgba(49, 132, 253, 0.5) !important;
}

.antmailer-btn-primary:active {
    color: #ffffff !important;
    background-color: #0a58ca !important;
    border-color: #0a53be !important;
}

/* Success Button */
.antmailer-btn-success {
    color: #ffffff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.antmailer-btn-success:hover {
    color: #ffffff !important;
    background-color: #157347 !important;
    border-color: #146c43 !important;
}

.antmailer-btn-success:focus {
    color: #ffffff !important;
    background-color: #157347 !important;
    border-color: #146c43 !important;
    box-shadow: 0 0 0 0.2rem rgba(60, 153, 110, 0.5) !important;
}

.antmailer-btn-success:active {
    color: #ffffff !important;
    background-color: #146c43 !important;
    border-color: #13653f !important;
}

/* Danger Button */
.antmailer-btn-danger {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.antmailer-btn-danger:hover {
    color: #ffffff !important;
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

.antmailer-btn-danger:focus {
    color: #ffffff !important;
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5) !important;
}

.antmailer-btn-danger:active {
    color: #ffffff !important;
    background-color: #bd2130 !important;
    border-color: #b21f2d !important;
}

/* Secondary Button */
.antmailer-btn-secondary {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.antmailer-btn-secondary:hover {
    color: #ffffff !important;
    background-color: #5c636a !important;
    border-color: #565e64 !important;
}

.antmailer-btn-secondary:focus {
    color: #ffffff !important;
    background-color: #5c636a !important;
    border-color: #565e64 !important;
    box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5) !important;
}

.antmailer-btn-secondary:active {
    color: #ffffff !important;
    background-color: #565e64 !important;
    border-color: #51585e !important;
}

/* Info Button */
.antmailer-btn-info {
    color: #ffffff !important;
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
}

.antmailer-btn-info:hover {
    color: #000000 !important;
    background-color: #31d2f2 !important;
    border-color: #25cff2 !important;
}

.antmailer-btn-info:focus {
    color: #000000 !important;
    background-color: #31d2f2 !important;
    border-color: #25cff2 !important;
    box-shadow: 0 0 0 0.2rem rgba(11, 172, 204, 0.5) !important;
}

.antmailer-btn-info:active {
    color: #000000 !important;
    background-color: #3dd5f3 !important;
    border-color: #25cff2 !important;
}

/* Warning Button */
.antmailer-btn-warning {
    color: #000000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.antmailer-btn-warning:hover {
    color: #000000 !important;
    background-color: #ffca2c !important;
    border-color: #ffc720 !important;
}

.antmailer-btn-warning:focus {
    color: #000000 !important;
    background-color: #ffca2c !important;
    border-color: #ffc720 !important;
    box-shadow: 0 0 0 0.2rem rgba(217, 164, 6, 0.5) !important;
}

.antmailer-btn-warning:active {
    color: #000000 !important;
    background-color: #ffcd39 !important;
    border-color: #ffc720 !important;
}

/* Dark Button */
.antmailer-btn-dark {
    color: #ffffff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.antmailer-btn-dark:hover {
    color: #ffffff !important;
    background-color: #1c1f23 !important;
    border-color: #1a1e21 !important;
}

.antmailer-btn-dark:focus {
    color: #ffffff !important;
    background-color: #1c1f23 !important;
    border-color: #1a1e21 !important;
    box-shadow: 0 0 0 0.2rem rgba(66, 70, 73, 0.5) !important;
}

.antmailer-btn-dark:active {
    color: #ffffff !important;
    background-color: #1a1e21 !important;
    border-color: #171a1d !important;
}

/* Light Button */
.antmailer-btn-light {
    color: #000000 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

.antmailer-btn-light:hover {
    color: #000000 !important;
    background-color: #e9ecef !important;
    border-color: #e9ecef !important;
}

.antmailer-btn-light:focus {
    color: #000000 !important;
    background-color: #e9ecef !important;
    border-color: #e9ecef !important;
    box-shadow: 0 0 0 0.2rem rgba(211, 212, 213, 0.5) !important;
}

.antmailer-btn-light:active {
    color: #000000 !important;
    background-color: #e9ecef !important;
    border-color: #e9ecef !important;
}

/* Outline Button Variants */
.antmailer-btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.antmailer-btn-outline-secondary {
    color: #6c757d !important;
    border-color: #6c757d !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-secondary:hover {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.antmailer-btn-outline-success {
    color: #198754 !important;
    border-color: #198754 !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-success:hover {
    color: #ffffff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}

.antmailer-btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-danger:hover {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.antmailer-btn-outline-warning {
    color: #ffc107 !important;
    border-color: #ffc107 !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-warning:hover {
    color: #000000 !important;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
}

.antmailer-btn-outline-info {
    color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-info:hover {
    color: #000000 !important;
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
}

.antmailer-btn-outline-light {
    color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-light:hover {
    color: #000000 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

.antmailer-btn-outline-dark {
    color: #212529 !important;
    border-color: #212529 !important;
    background-color: transparent !important;
}

.antmailer-btn-outline-dark:hover {
    color: #ffffff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

/* Small Size Button */
.antmailer-btn-sm {
    padding: 0.25rem 0.5rem !important;
   font-size: 0.8125rem !important;
   border-radius: 0.25rem !important;
}


/* Large Size Button */
.antmailer-btn-lg {
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
}

/* Button Group Spacing Fix */
.tab-toolbar .antmailer-btn + .antmailer-btn {
    margin-left: 0 !important;
}

/* Icon spacing in buttons */
.antmailer-btn .bi {
    margin-right: 0.375rem !important;
}

/* Input group button spacing fix */
.compose-form .input-group .antmailer-btn.ms-1 {
    margin-left: 0.25rem !important;
}

.antmailer-btn .bi:last-child {
    margin-right: 0 !important;
    margin-left: 0.375rem !important;
}

/* Responsive Button Adjustments */
@media (max-width: 768px) {
    .antmailer-btn {
        font-size: 0.8125rem !important;
        padding: 0.3rem 0.6rem !important;
        margin: 0.1rem !important;
    }
    
    .tab-toolbar .antmailer-btn {
        width: 100% !important;
        margin: 0.125rem 0 !important;
    }
}

@media (max-width: 576px) {
    .antmailer-btn {
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Square Checkboxes */
.form-check-input[type="checkbox"] {
    border-radius: 0 !important;
}

.form-check-input[type="checkbox"]:checked {
    border-radius: 0 !important;
}

/* Square Buttons */
.btn, button {
    border-radius: 0 !important;
}

/* Override for modal buttons to have rounded corners and proper styling */
.modal .btn,
.modal button.btn,
#loadTemplateModal .btn {
    border-radius: 0.375rem !important; /* Bootstrap default rounded corners */
    font-weight: 600 !important; /* Semi-bold font weight */
}

/* Email Account actions: round Edit/Populate buttons like the rest of the app */
.card-footer .antmailer-btn {
    border-radius: 0.375rem !important;
}

.card-footer .antmailer-btn.antmailer-btn-sm {
    border-radius: 0.25rem !important;
}

/* Also round standard Bootstrap outline buttons in the footer */
.card-footer .btn {
    border-radius: 0.375rem !important;
}

.card-footer .btn.btn-sm {
    border-radius: 0.25rem !important;
}

/* Fix modal title padding */
.modal-title {
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* Reduce padding in template modal card headers */
#loadTemplateModal .card-header {
    padding: 0.5rem 1rem !important;
}

/* Fix tab content area bottom corners */
.antmailer-content {
    border-bottom: 1px solid #dee2e6 !important;
    border-left: 1px solid #dee2e6 !important;
    border-right: 1px solid #dee2e6 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-radius: 0 !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
}

/* All tab buttons with rounded corners */
.tab-toolbar .antmailer-btn,
.email-actions .antmailer-btn,
.email-list-toolbar .antmailer-btn {
    border-radius: 3px !important;
}

/* Tab navigation with rounded top corners */
.antmailer-tabs .nav-tabs .nav-link {
    border-radius: 3px 3px 0 0 !important;
}

/* Modal backdrop z-index fix for high z-index icons */
.modal-backdrop {
    z-index: 10050 !important;
}

/* Contact dropdown z-index fixes */
.dropdown-menu {
    background-color: white !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

#contacts-dropdown-list,
#contacts-dropdown-list-cc, 
#contacts-dropdown-list-bcc {
    z-index: 25000 !important;
    background-color: white !important;
    opacity: 1 !important;
}

/* Hide person icons when dropdown is open */
.dropdown.show .bi-person,
.dropdown.show .bi-person-fill,
.dropdown.show .bi-person-fill-add {
    display: none !important;
}

/* Hide all icons when any contact dropdown is open */
.dropdown-menu.show ~ * .bi-person,
.dropdown-menu.show ~ * .bi-person-fill,
.dropdown-menu.show ~ * .bi-person-fill-add,
.dropdown-menu.show ~ * .bi-floppy,
.dropdown-menu.show ~ * .bi-floppy-fill,
.dropdown-menu.show ~ * .bi-paperclip {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Prevent focus outline and text cursor on clickable icons */
.bi-person-fill,
.bi-person-fill-add,
.bi-cloud-upload,
.bi-cloud-download-fill,
.bi-paperclip {
    outline: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.bi-person-fill:focus,
.bi-person-fill-add:focus,
.bi-cloud-upload:focus,
.bi-cloud-download-fill:focus,
.bi-paperclip:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Ensure dropdowns have solid background */
.dropdown-menu.show {
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.btn:hover {
    border-radius: 0 !important;
}

.btn:focus {
    border-radius: 0 !important;
}

.btn:active {
    border-radius: 0 !important;
}

/* Rich Tagger button overrides removed - now using clean Bootstrap icon styling from rich-tagger.css */



/* Email List Date/Time Styling */
.email-list-day {
    color: black; /* Bootstrap danger red - easily change this color */
    /*font-weight: 600;*/
}

.email-list-date {
    color: black; /* Bootstrap danger red - easily change this color */
    display: inline-block;
    margin-top: 5px; /* Increased from 3px for better alignment */
}

.email-list-time {
    color: black; /* Bootstrap success green - easily change this color */
    display: inline-block;
    margin-top: 5px; /* Increased from 3px for better alignment */
}

#inbox-email-list .form-check-input {
    outline: none !important;
    box-shadow: none !important;
}

#inbox-email-list .form-check-input:focus,
#inbox-email-list .form-check-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
