html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Global checkbox styling - use existing theme gray */
.form-check-input {
    accent-color: var(--bs-secondary);
}

.form-check-input:checked {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

/* Button-style checkboxes */
.btn-check:checked + .btn,
.btn-check:active + .btn {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.select-auto-width {
    width: auto !important;
    min-width: fit-content;
}
.select-widest-option {
    width: auto;
    display: inline-block;
}
.animated-text {
    font-weight: bold;
    font-family: Arial;
    font-size: 14px;
    animation: l0 1s linear infinite alternate;
    margin-left: 10px;
    color: green;
    text-align: center;
}
@keyframes l0 {
    to {
        opacity: 0
    }
}
.btn-green-plus-sign {
    display: flex;
    align-items: center; /* Centers vertically */
    justify-content: center; /* Centers horizontally (optional) */
}
.btn-green-plus-sign2  {
    background-color: #28a745;
    padding: 4px 4px 6px 4px;
    border-radius: 10px;
    line-height: 1;
    font-size: 20px;
    color: #FFF;
    font-weight: bold;
}
.modal-400 { /* Note: modal-sm is 300px - see bootstrap*/
    max-width: 400px;
}
.modal-500 {
    max-width: 500px;
}
.modal-600 {
    max-width: 600px;
}
.modal-700 {
    max-width: 700px;
}
.modal-900 { /* Note: modal-lg is 800px - see bootstrap */
    max-width: 900px;
}
.modal-1000 {
    max-width: 1000px;
}
.modal-1100 {
    max-width: 1100px;
}
.modal-1200 {
    max-width: 1200px;
}
.modal-1300 {
    max-width: 1300px;
}

.btn-main {
    --clr-font-main: hsla(0 0% 20% / 100);
    --btn-bg-1: hsla(194 100% 69% / 1);
    --btn-bg-2: hsla(217 100% 56% / 1);
    --btn-bg-color: hsla(360 100% 100% / 1);
    --radii: 0.5em;
    cursor: pointer;
    line-height: .9;
    min-width: 120px;
    min-height: 20px;
    font-size: var(--size, 1rem);
    font-weight: 500;
    transition: 0.8s;
    background-size: 280% auto;
    background-image: linear-gradient( 90deg, var(--btn-bg-2) 0%, var(--btn-bg-1) 55%, var(--btn-bg-2) 90% );
    border: none;
    border-radius: var(--radii);
    color: var(--btn-bg-color);
    box-shadow: 0px 0px 20px rgba(71, 184, 255, 0.5), 0px 5px 5px -1px rgba(58, 125, 233, 0.25), inset 4px 4px 8px rgba(175, 230, 255, 0.5), inset -4px -4px 8px rgba(19, 95, 216, 0.35);
}

    .btn-main:hover {
        
        background-image: linear-gradient( 170deg, var(--btn-bg-2) 0%, var(--btn-bg-1) 55%, var(--btn-bg-2) 90% );
    }

    .btn-main:is(:focus, :focus-visible, :active) {
        outline: none;
        box-shadow: 0 0 0 3px var(--btn-bg-color), 0 0 0 6px var(--btn-bg-2);
    }
    .btn-main-highlighted {
        background-position: right center;
        box-shadow: 0 0 0 3px var(--btn-bg-color), 0 0 0 6px var(--btn-bg-2) !important;
        transform: scale(0.98);
    }

@media (prefers-reduced-motion: reduce) {
    .btn-main {
        transition: linear;
    }
}
.quick-communicate {
    border-radius:8px;
    margin-right:8px;
}
/* Email Attachment Dropzone - Global styles for modal */
.attachment-dropzone-modal {
    border: 3px dashed #0d6efd !important;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem;
    min-height: 250px;
}

.attachment-dropzone-modal:hover {
    border-color: #0b5ed7 !important;
    background-color: #e7f1ff;
}

.attachment-dropzone-modal.drag-over {
    border-color: #198754 !important;
    background-color: #d1e7dd;
}

/* Email Compose - Recipient remove icon */
.recipient-remove {
    cursor: pointer;
}

/* Email Compose - Upload icon in attachment modal */
.upload-icon {
    font-size: 3rem;
    color: var(--bs-primary);
}

/* Email Modal dialogs - z-index and sizing */
.attachment-modal-dialog {
    z-index: 1055;
    max-width: 500px;
}

.send-modal-dialog {
    z-index: 1055;
}

/* Email recipient input and tags */
.email-manual-input {
    flex: 1;
    min-width: 200px;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
}

.email-manual-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Email recipient tags - consistent styling for To, Cc, Bcc */
.div-email-to > div,
.div-email-cc > div,
.div-email-bcc > div {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-tertiary, #e9ecef);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 1rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.875rem;
    max-width: 250px;
}

.div-email-to > div span,
.div-email-cc > div span,
.div-email-bcc > div span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.25rem;
}

.div-email-to > div .ph-x-circle,
.div-email-cc > div .ph-x-circle,
.div-email-bcc > div .ph-x-circle {
    cursor: pointer;
    color: var(--text-muted, #6c757d);
    transition: color 0.15s ease-in-out;
}

.div-email-to > div .ph-x-circle:hover,
.div-email-cc > div .ph-x-circle:hover,
.div-email-bcc > div .ph-x-circle:hover {
    color: var(--bs-danger, #dc3545);
}

/* Modal backdrop - consistent semi-transparent overlay */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ========================================
   Autocomplete Dropdown Styles
   Theme-aware email recipient autocomplete
   ======================================== */

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: auto;
    z-index: 1050;
    background-color: var(--bg-primary);
    border: 2px solid var(--bs-primary);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    min-width: 350px;
    max-width: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
}

.autocomplete-item {
    padding: 0.875rem 1rem;
    cursor: pointer;
    margin-bottom: 0.375rem;
    border: 1px solid var(--border-color);
    border-radius: var(--bs-border-radius);
    transition: all 0.15s ease-in-out;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.autocomplete-item:last-child {
    margin-bottom: 0;
}

.autocomplete-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--bs-primary);
    box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-1px);
}

.autocomplete-item:active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--text-light);
    transform: translateY(0);
}

.autocomplete-item:active i,
.autocomplete-item:active .text-muted {
    color: var(--text-light) !important;
}

.autocomplete-item i {
    color: var(--bs-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ========================================
   Email Autocomplete Dropdown Styles
   For email input field suggestions
   ======================================== */

.email-autocomplete-dropdown {
    position: fixed;
    z-index: 9999;
    background-color: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--bs-border-radius, 0.375rem);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
}

.email-autocomplete-item {
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background-color 0.15s ease-in-out;
}

.email-autocomplete-item:last-child {
    border-bottom: none;
}

.email-autocomplete-item:hover,
.email-autocomplete-item.highlighted {
    background-color: var(--bg-tertiary, #f0f7ff);
}

.email-autocomplete-item strong {
    color: var(--text-primary, #212529);
    font-weight: 500;
}

.email-autocomplete-item small {
    font-size: 0.8rem;
}

@media print {
    @page {
        margin-top: 1in;
        margin-bottom: 0.75in;
        margin-left: 0.5in;
        margin-right: 0.5in;
    }

    /* Page break controls for tables */
    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group; /* Repeat header on each page */
    }

    .no-print {
        display: none !important;
    }

    .red-text td {
        color: #F00;
    }


    .blue-text td {
        color: #00F;
    }
}
