.gab-sidebar {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}
.gab-sidebar.show {
    transform: translateX(0);
    opacity: 1;
}

/* Header styling for the sidebar */
.gab-global-menu-child .header-content {
    display: flex;
    flex-direction: column;
}

.gab-global-menu-child .header-content h2 {
    margin-bottom: 0.25rem;
}
.gab-global-menu-child .header-content input.template-title {
    margin-bottom: 0.25rem;
    margin-top: 0.85rem;
    font-family: var(--global--font-secondary);
    width: 100%;
    font-size: 1.5em;
    font-weight: bold;
    border: none;
    color: #334155;
}

.gab-global-menu-child .recipients-count {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5rem;
}

.gab-global-menu-child .recipients-count.error {
    color: #f44336;
}

.gab-global-menu-child .header-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 1rem;
}

/* Provider settings icon styling */
.gab-global-menu-child .provider-settings-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.gab-global-menu-child .provider-settings-icon:hover {
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

/* Provider display badge styling */
.gab-global-menu-child .provider-info {
    margin-bottom: 1rem;
}

.gab-global-menu-child .provider-badge {
    display: flex;
    align-items: center;
    background-color: #f0f7ff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gab-global-menu-child .provider-label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.gab-global-menu-child .provider-name {
    font-weight: 600;
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
}

.gab-global-menu-child .provider-email {
    color: #666;
    font-style: italic;
}

/* Provider settings dialog styling */
.provider-settings-dialog .provider-field {
    margin-bottom: 1.25rem;
}

.provider-settings-dialog .provider-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.provider-settings-dialog .provider-field input {
    width: 100%;
}

/* Email validation error styling */
.provider-settings-dialog .p-error {
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.provider-settings-dialog .p-invalid {
    border-color: #f44336 !important;
}

.provider-settings-dialog .provider-field:last-child {
    margin-bottom: 0;
}

.gab-global-menu-child .send-campaign-button {
    background-color: #4caf50;
    border-color: #4caf50;
}

.gab-global-menu-child .send-campaign-button:not(:disabled):hover {
    background-color: #388e3c;
    border-color: #388e3c;
}

.unlayer-editor-container {
    min-height: 56vh;
}

.unlayer-editor-container > iframe {
    min-height: min(73vh, 600px) !important;
}

.gab-global-menu-child .email-trigger-button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    /* padding: 0.5rem 1rem;
    background-color: #4caf50;
    color: white; */
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

/* .gab-global-menu-child .email-trigger-button:hover {
    background-color: #388e3c;
} */

.gab-global-menu-child .gab-sidebar-content {
    /* padding: 1.5rem; */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gab-global-menu-child .gab-selected-rows {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-align: center;
    font-size: 1.1em;
}

.gab-global-menu-child .template-actions {
    display: none; /* Hide the old template actions */
}

/* Template menu styling */
.gab-global-menu-child .template-menu-container {
    margin-bottom: 1.5rem;
    width: 110px;
}

.gab-global-menu-child .template-menu-button {
    width: 100%;
    justify-content: flex-start;
    background-color: #f5f9ff;
    border-color: #d0e1fd;
    color: #2196F3;
}

.gab-global-menu-child .template-menu-button:hover {
    background-color: #e0f0ff;
    border-color: #a6c8ff;
}

.gab-global-menu-child .p-menu.p-menu-overlay {
    min-width: 200px;
}

.gab-global-menu-child .p-menuitem-disabled .p-menuitem-icon,
.gab-global-menu-child .p-menuitem-disabled .p-menuitem-text {
    opacity: 0.5;
}

/* Updated email field styling for a more natural layout */
.gab-global-menu-child .email-field {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.gab-global-menu-child .email-field label {
    display: block;
    min-width: 6rem;
    padding-top: 0.5rem;
    font-weight: 600;
    color: #333;
}

.gab-global-menu-child .email-field .p-inputtext,
.gab-global-menu-child .email-field .p-multiselect,
.gab-global-menu-child .email-field .p-chips {
    flex: 1;
}

.gab-global-menu-child .email-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-left: 6rem;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.gab-global-menu-child .email-field-container {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
}

.gab-global-menu-child .email-field {
    margin-bottom: 1rem;
}

.gab-global-menu-child .email-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    min-width: 4rem;
}

.gab-global-menu-child .unlayer-editor-container {
    flex-grow: 1;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 400px;
    width: 100%;
}

.gab-global-menu-child .email-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gab-global-menu-child .template-dialog .p-dialog-content {
    padding: 1.5rem;
}

/* Attachments styles */
.gab-global-menu-child .attachments-section {
    /* margin-bottom: 1rem; */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    /* padding: 0.75rem 1rem; */
    background-color: #f9f9f9;
}

.gab-global-menu-child .attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.gab-global-menu-child .attachments-header label {
    font-weight: 600;
    color: #333;
}

.gab-global-menu-child .attachment-button {
    margin-left: auto;
}

.gab-global-menu-child .attachments-container {
    margin-bottom: 0.5rem;
}

/* .gab-global-menu-child .attachment-uploader {
    margin-bottom: 1rem;
} */

.gab-global-menu-child .attachment-uploader .p-fileupload-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
}

.gab-global-menu-child .attachment-uploader .p-fileupload-content:hover {
    background-color: #e8e8e8;
    border-color: #aaa;
}

.gab-global-menu-child .attachment-list {
    margin-top: 0.75rem;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 0.5rem;
    background-color: white;
}

.gab-global-menu-child .attachment-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.gab-global-menu-child .attachment-item .attachment-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gab-global-menu-child .attachment-item .attachment-size {
    color: #777;
    font-size: 0.85em;
    margin: 0 0.5rem;
}

.gab-global-menu-child .attachment-item i {
    color: #e57373;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.gab-global-menu-child .attachment-item i:hover {
    background-color: #ffe0e0;
}

.gab-global-menu-child .attachment-item:last-child {
    margin-bottom: 0;
}

.gab-global-menu-child .cursor-pointer {
    cursor: pointer;
}

.gab-global-menu-child .attachment-list {
    margin-bottom: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 0.5rem;
    background-color: white;
}

.gab-global-menu-child .attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.3rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.gab-global-menu-child .attachment-item:last-child {
    margin-bottom: 0;
}

.gab-global-menu-child .cursor-pointer {
    cursor: pointer;
}

.gab-global-menu-child .attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.gab-global-menu-child .attachment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.gab-global-menu-child .attachment-option:hover {
    background-color: #f5f5f5;
}

.gab-global-menu-child .attachment-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #607d8b;
}

.gab-global-menu-child .no-attachments {
    text-align: center;
    padding: 2rem;
    color: #777;
    font-style: italic;
}

/* Merge tags styles */
.p-accordion-content .merge-tags-grid {
    /* display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 400px; */
    margin-left: 1rem;
    overflow-y: auto;
}

.p-accordion-content .merge-tag-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.p-accordion-content .merge-tag-item > *:first-child {
    width: 1.9rem;
    display: inline-block;
    text-align: center;
}

.p-accordion-content .merge-tag-item:hover {
    background-color: #f5f5f5;
}

.p-accordion-content .merge-tag-name {
    /* font-weight: 600; */
    margin-bottom: 0.3rem;
}

.p-accordion-content .merge-tag-value {
    color: #666;
    font-size: 0.9em;
    font-family: monospace;
}

.p-accordion-content .merge-tag-sample {
    color: #777;
    font-size: 0.85em;
    font-style: italic;
    margin-top: 0.3rem;
}

.p-accordion-content .merge-tags-dialog .p-dialog-content {
    max-height: 70vh;
    overflow-y: auto;
}

.p-accordion-content .merge-tags-container .p-accordion-header-text {
    font-weight: 600;
}

.gab-global-menu-child .actions {
    display: flex;
    gap: 0.75rem;
    margin-left: 1rem;
    padding-top: 0.5rem;
}

.gab-global-menu-child .cursor {
    cursor: pointer;
    color: #2196F3;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
}

.gab-global-menu-child .cursor i {
    margin-right: 0.25rem;
}

/* .gab-global-menu-child .flex {
    display: flex;
    flex-direction: column;
} */

.gab-global-menu-child .current-template-info {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #f0f7ff;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
    font-size: 0.9em;
}

.gab-global-menu-child .attachment-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    width: 100%;
    justify-content: space-between;
}

.gab-global-menu-child .attachment-item.pending {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
}

.gab-global-menu-child .attachment-item.uploaded {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.gab-global-menu-child .attachment-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.gab-global-menu-child .attachment-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gab-global-menu-child .attachment-size {
    color: #777;
    font-size: 0.85em;
}

.gab-global-menu-child .attachment-status {
    font-size: 0.8em;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-right: 1rem;
}

.gab-global-menu-child .attachment-status.pending {
    background-color: #fff59d;
    color: #f57f17;
}

.gab-global-menu-child .attachment-status.uploaded {
    background-color: #a5d6a7;
    color: #1b5e20;
}

.gab-global-menu-child .attachment-item i {
    color: #e57373;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.gab-global-menu-child .attachment-item i:hover {
    background-color: #ffe0e0;
    cursor: pointer;
}

/* Preview dialog styling */
.preview-dialog .email-headers {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.preview-dialog .email-header-field {
    display: flex;
    margin-bottom: 8px;
}

.preview-dialog .email-header-field:last-child {
    margin-bottom: 0;
}

.preview-dialog .email-header-label {
    min-width: 80px;
    font-weight: 600;
    color: #555;
}

.preview-dialog .email-header-value {
    flex: 1;
}

.preview-dialog .email-header-value.subject {
    font-weight: 600;
}

.preview-dialog .email-body {
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
}
