/* Styles pour la modale de modification de configuration */

#signature_collapsible_block_div,
#html_template_collapsible_block_div,
#footer_message_collapsible_block_div,
#email__signature_collapsible_block_div,
#email__html_template_collapsible_block_div,
#email__footer_message_collapsible_block_div {
    width: 100% !important;
    margin-top: 20px;
}

#signature_block_content_div,
#html_template_block_content_div,
#footer_message_block_content_div,
#email__signature_block_content_div,
#email__html_template_block_content_div,
#email__footer_message_block_content_div {
    width: 100% !important;
    background-color: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-sizing: border-box;
    display: none; /* Masqué par défaut */
}

/* Styles pour l'état déplié */
#signature_block_content_div[data-collapsed="false"],
#html_template_block_content_div[data-collapsed="false"],
#footer_message_block_content_div[data-collapsed="false"],
#email__signature_block_content_div[data-collapsed="false"],
#email__html_template_block_content_div[data-collapsed="false"],
#email__footer_message_block_content_div[data-collapsed="false"] {
    display: block !important;
}

.default-preview-container {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background-color: #fafafa;
    color: #333;
    min-height: 80px;
    box-sizing: border-box;
    overflow: auto;
    transition: border-color 0.2s ease;
}

.default-preview-container:hover {
    border-color: #bdbdbd;
}

.default-preview-empty-message {
    margin: 0;
    color: #888;
    font-style: italic;
}

.default-preview-iframe {
    width: 100%;
    border: none;
    min-height: 250px;
    background-color: #fff;
}

/* Styles pour les boutons avec icônes */
.tb_button i {
    margin-right: 5px;
}

/* Styles pour les états de chargement */
.tb_button .fa-spinner {
    margin-right: 5px;
}

/* Styles spécifiques pour les boutons de sauvegarde */
#button_save_signature_b_0 i,
#button_save_html_template_graphique_b_0 i {
    margin-right: 5px;
}

/* ===== STYLES POUR LES MESSAGES "BIENTÔT DISPONIBLE" ===== */
#coming_soon_message {
    width: 100%;
    text-align: center;
    padding: 20px;
}

#coming_soon_icon {
    width: 100%;
    margin-bottom: 20px;
}

#coming_soon_icon_svg {
    display: inline-block;
    margin: 0 auto;
}

#coming_soon_title {
    width: 100%;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

#coming_soon_description {
    width: 100%;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* ===== STYLES POUR LES TEMPLATES PLIABLES ===== */
.template-block {
    align: left;
    width: 100%;
    box-sizing: border-box;
}

.template-block:not(:first-child) {
    margin-top: 20px;
}

.template-header {
    background-color: #f5f5f5;
    border-radius: 8px 8px 0 0;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    width: 100%;
    box-sizing: border-box;
}

.template-title {
    display: flex;
    align-items: center;
    width: auto;
}

.template-title-text {
    font-weight: bold;
    color: #333;
    margin: 0;
    margin-right: 10px;
}

.template-custom-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
}

.template-right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-edit-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.template-edit-button:hover {
    background-color: #f0f0f0;
}

.template-chevron {
    color: #666;
    transition: transform 0.3s ease;
}

.template-content {
    background-color: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-top: none;
    width: 100%;
    box-sizing: border-box;
}

.template-default-section {
    align: left;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.template-default-label {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.template-default-html {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.template-custom-section {
    align: left;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
}

.template-custom-label {
    color: #28a745;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #28a745;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.template-custom-html {
    background-color: #d4edda;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    margin-bottom: 15px;
}

.template-custom-info {
    background-color: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    color: #856404;
    font-size: 12px;
}

/* ===== STYLES POUR LES SECTIONS DE CONFIGURATION ===== */
.template-satisfaction-section,
.template-agent-notification-section {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
}

.template-satisfaction-controls,
.template-agent-notification-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-satisfaction-checkbox,
.template-agent-notification-checkbox {
    width: 18px;
    height: 18px;
}

.template-satisfaction-checkbox:disabled,
.template-agent-notification-checkbox:disabled {
    cursor: not-allowed;
}

.template-satisfaction-label,
.template-agent-notification-label {
    color: #495057;
    font-size: 14px;
    font-weight: bold;
}

.template-satisfaction-label:not([for*="disabled"]),
.template-agent-notification-label:not([for*="disabled"]) {
    cursor: pointer;
}

.template-satisfaction-description,
.template-agent-notification-description {
    color: #6c757d;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* ===== STYLES POUR LES AUTOMATISATIONS ===== */
#automations_container {
    padding: 20px;
}

.automations-header {
    margin-bottom: 20px;
}

.automations-title {
    color: #333;
    margin-bottom: 15px;
}

.automations-subtitle {
    color: #666;
    font-size: 14px;
}

.automations-actions {
    margin-top: 30px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.automations-actions .btn {
    margin-right: 10px;
}

.automation-form-group {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.automation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.automation-label {
    font-weight: bold;
    color: #333;
    margin: 0;
}

.automation-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.automation-checkbox {
    transform: scale(1.2);
}

.automation-checkbox-label {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.automation-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.automation-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.automation-select {
    flex: 1;
    max-width: 200px;
}

.automation-default-value {
    color: #999;
    font-size: 12px;
}

.automation-validation {
    margin-top: 5px;
    font-size: 12px;
}

.automation-validation-warning {
    color: #f39c12;
}

.automation-validation-success {
    color: #27ae60;
}

/* ===== STYLES POUR LA SECTION MESSAGE DE PIED DE PAGE ===== */
#email__footer_message_image_upload_container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#email__footer_message_image_btn,
#email__footer_message_image_remove_btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

#email__footer_message_image_btn {
    background-color: #007bff;
    color: white;
}

#email__footer_message_image_btn:hover {
    background-color: #0056b3;
}

#email__footer_message_image_remove_btn {
    background-color: #dc3545;
    color: white;
}

#email__footer_message_image_remove_btn:hover {
    background-color: #c82333;
}

#email__footer_message_image_preview {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

#email__footer_message_image_preview_img {
    max-width: 500px;
    max-height: 100px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

#email__footer_message_preview_container {
    min-height: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#email__footer_message_preview_container a {
    color: inherit;
    text-decoration: none;
}

#email__footer_message_preview_container a:hover {
    text-decoration: underline;
}