:root {
    --color1: #ffffff;
    --color2: #333333;
    --color-hover: #ed1c24;
    --bg-color: #f5f5f5;
    --menu-bg: #ffffff;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease-in-out;
    --icon-size: 1.25rem;
    --icon-color: #666666;
    --popup-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --popup-bg: #ffffff;
    --popup-hover: rgba(237, 28, 36, 0.05);
    --popup-border: rgba(0, 0, 0, 0.05);
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
    display: none; /* Masqué par défaut */
}

.popup-content {
    position: relative;
    background: white;
    width: 60%;
    height: 100%;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.popup-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    font-size: 20px;
    color: var(--color-hover);
}

.popup-header .close-popup {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--color-hover);
    cursor: pointer;
}

.popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 80px; /* Ajouter de l'espace pour le form-actions */
}

.popup-content .details-section {
    margin-bottom: 20px;
}

.popup-content .details-section h3 {
    font-size: 18px;
    color: var(--color-hover);
    margin-bottom: 10px;
}

.popup-content .details-section p {
    font-size: 14px;
    color: var(--color2);
    margin: 5px 0;
}

.inspection-popup .form-group{
    width: 100%;
}
.inspection-popup .form-actions{
    width: auto;
}
.inspection-popup .form-group textarea{
    border: 1px solid #c1bfbf;
    height: 100px;
}

.form-section h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;

    padding-bottom: 10px;
}

.form-group label {
    font-size: 14px;
    color: #666;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.form-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel {
    background: #ccc;
    color: #333;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-save {
    background: var(--color-hover);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-save:hover {
    background: #d41920;
}
.group-final{
    padding-bottom: 200px;
}

.collapsible h3 {
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.collapsible .toggle-section {
    font-size: 1.2rem;
    color: var(--icon-color);
    transition: var(--transition);
}

.collapsible .section-content {
    display: none; /* Masqué par défaut */
    overflow: hidden;
    transition: max-height 0.3s ease; /* Transition pour un effet fluide */
}

.collapsible.open .section-content {
    display: grid; /* Afficher la section lorsqu'elle est ouverte */
}

.collapsible.open .toggle-section {
    transform: rotate(180deg); /* Rotation du chevron lorsqu'il est ouvert */
}
.section-content{
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.form{
    display: flex;
    gap: 10px;
    padding-bottom: 20px;
}

.form-group-group{
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.form-group-group select{
    width: 180px;
}

.form-left{
    width: 70%;
}
.form-right{
    width: 30%;
}
.info span {
    color: #6c757d; 
    font-size: 0.75em; 
    font-style: italic; 
    display: block; 
    line-height: 1.2;
}

/* Assurez-vous que chaque section collapsible ajuste sa hauteur dynamiquement */
.collapsible {
    margin-bottom: 50px; /* Ajoute un espacement entre les sections */
}
.group-final{
    margin-bottom: 20px;
}

/* Conteneur des champs personnalisés */
#customFieldsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Style des champs personnalisés */
.custom-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-field input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
}

/* Bouton pour ajouter un nouveau champ */
.btn-add-field {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: var(--color-hover);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-add-field:hover {
    background-color: #d41920;
}

.remove-field-btn {
    background: none;
    border: none;
    color: #ff0000;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.remove-field-btn:hover {
    color: #cc0000;
}

.details-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.equipment-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.equipment-summary h3 {
    font-size: 18px;
    color: var(--color-hover);
    margin: 0;
}

.equipment-summary p {
    font-size: 14px;
    color: var(--color2);
    margin: 5px 0 0;
}

.edit-btn {
    margin-left: auto;
    background: var(--color-hover);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.edit-btn:hover {
    background: #d41920;
}

.details-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: white;
    padding: 0;
    z-index: 10;
}

.tab-btn {
    padding: 12px 24px;
    font-size: 0.9em;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--icon-color);
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--color-hover);
    background: var(--popup-hover);
}

.tab-btn.active {
    color: var(--color-hover);
    background: var(--popup-hover);
    border-bottom: 2px solid var(--color-hover);
    font-weight: 500;
}

.tab-btn .count {
    position: absolute;
    top: -5px;
    right: 8px;
    background: #ed1c2337;;
    color: #333;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.cost-summary {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--popup-shadow);
}

.cost-item h4 {
    font-size: 24px;
    color: var(--color-hover);
    margin: 0;
}

.cost-item p {
    font-size: 14px;
    color: var(--color2);
    margin: 5px 0 0;
}


.repair-request-popup{
   float: right;
}

/* Styles for custom fields in the New Fuel Transaction popup */
#fuelCustomFieldsContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fuel-custom-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fuel-custom-field input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.fuel-custom-field .remove-fuel-field-btn {
    background: none;
    border: none;
    color: #ff0000;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.fuel-custom-field .remove-fuel-field-btn:hover {
    color: #cc0000;
}

#addFuelCustomFieldBtn {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #ed1c24;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#addFuelCustomFieldBtn:hover {
    background-color: #d41920;
}

/* Style for the "Every", "On", and "Disabled" buttons */
.due-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.due-options button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.due-options button:hover {
    background: #e0e0e0;
}

.due-options button.active {
    background: #ed1c24;
    color: #fff;
    border-color: #ed1c24;
}

/* Style for the form sections that are shown/hidden based on button clicks */
.form-section.hidden {
    display: none;
}

.form-section.visible {
    display: block;
}

/* Conteneur des onglets */
.tabs {
    display: flex;
    gap: 10px; /* Espacement entre les onglets */
    margin-top: 10px;
    border-bottom: 2px solid #ddd; /* Ligne de séparation en bas */
    padding-bottom: 5px;
}

/* Style général pour les onglets */
.tab-btn {
    flex: 1; /* Chaque onglet prend une largeur égale */
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    border: none;
    border-bottom: 2px solid transparent; /* Ligne en bas pour l'état actif */
    background-color: #f9f9f9; /* Fond par défaut */
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Onglet actif */
.tab-btn.active {
    background-color: #fff; /* Fond blanc pour l'onglet actif */
    border-bottom: 2px solid var(--color-hover) ;
    color: var(--color-hover) /* Texte bleu pour l'onglet actif */
}

/* Effet au survol */
.tab-btn:hover {
    background-color: #f1f1f1; /* Fond gris clair au survol */
}

/* Contenu des onglets */
.tab-content {
    display: none; /* Masqué par défaut */
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none; /* Pas de bordure en haut pour se connecter aux onglets */
    border-radius: 0 0 8px 8px; /* Coins arrondis en bas */
    margin-top: -1px; /* Pour aligner avec la bordure des onglets */
}

/* Contenu actif */
.tab-content.active {
    display: block; /* Afficher uniquement le contenu actif */
}

/* Conteneur principal pour les champs spécifiques */
.specific-dates-container,
.specific-kilometers-container {
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Ligne pour chaque champ spécifique */
.specific-date-row,
.specific-kilometers-row {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacement entre les éléments */
    margin-bottom: 10px;
}

/* Champ d'entrée pour les dates et les kilomètres */
.specific-date,
.specific-kilometers {
    flex: 1; /* Prend toute la largeur disponible */
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.specific-date:focus,
.specific-kilometers:focus {
    border-color: var(--color-hover); /* Bordure bleue au focus */
    outline: none;
}

/* Bouton pour supprimer un champ */
.remove-date-btn,
.remove-kilometers-btn {
    background-color: #ff4d4d;
    color: #fff;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-date-btn:hover,
.remove-kilometers-btn:hover {
    background-color: #cc0000; /* Rouge plus foncé au survol */
}

/* Bouton pour ajouter un nouveau champ */
.btn-add-field {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #28a745; /* Vert */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-add-field:hover {
    background-color: #218838; /* Vert plus foncé au survol */
}

/* Checkbox pour "Repeat Annually" */
label input[type="checkbox"] {
    margin-right: 5px;
}

label {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}
.import-tasks-popup{
    width: 40%;
}
.import-tasks-popup .form-actions{
    width: 37%;
}
.renewal{
    width: 27%;
}
