/*
 * Theme Name:  Revision Child
 * Theme URI:   https://revision.codesupply.co/
 * Description: Revision Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    revision
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

/*
 * Theme Name:  Revision Child
 * Theme URI:   https://revision.codesupply.co/
 * Description: Revision Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    revision
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

/* CSS pour masquer les éléments spécifiés dans les publications de type "medication" */
.postid-medication .cs-entry__header-image-overlay,
.postid-medication .cs-entry__header-standard,
.postid-medication .cs-entry__header-primary,
.single-medication .cs-entry__header-image-overlay,
.single-medication .cs-entry__header-standard,
.single-medication .cs-entry__header-primary {
    display: none !important;
}

.cs-header__logo img {
	width: 160px;
}
.improved-medication-search-form {

    margin: 20px auto;
    font-family: Arial, sans-serif;
    border: 1px solid #eee;       /* Contour gris */
    border-radius: 10px;          /* Coins arrondis */
    padding: 30px;                /* Espace intérieur pour éviter que le contenu ne touche les bords */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Ombre légère pour améliorer l'apparence (optionnel) */
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#search_query {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
	min-height: 44px;
  	padding: 5px 10px;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}

.search-submit {
    width: 100%;
    padding: 10px;
    background-color: var(--theme-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background-color: var(--theme-color-dark);
}

.improved-alphabet-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px; /* un peu plus d’espace entre les lettres */
  margin: 20px 0;
}

.improved-alphabet-links a {
  padding: 5px 10px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.improved-alphabet-links a:hover,
.improved-alphabet-links a:focus {
  background-color: var(--theme-color);
  color: white;
  outline: none;
}

.improved-alphabet-links a.active {
  background-color: var(--theme-color);
  color: white;
  pointer-events: none;
}


/* Liste des médicaments */
div.text ul.improved-medications-list {
    padding: 0;
    margin: 0;
    min-height: 300px;
    list-style: none;
}

/* Items de la liste */
div.text ul.improved-medications-list li.medication-item {
    position: relative;
    margin-bottom: 15px; /* Espacement entre les éléments */
    line-height: 1.6; /* Meilleure lisibilité */
    list-style-position: outside;
}

/* Liens des médicaments */
div.text ul.improved-medications-list li.medication-item a {
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    gap: 10px; /* Espace entre l'icône et le texte */
    padding: 8px; /* Ajout de padding pour l'interaction */
    border-radius: 4px; /* Coins arrondis pour un meilleur style */
}

div.text ul.improved-medications-list li.medication-item a:hover {
    color: var(--theme-color);
    background-color: rgba(0, 0, 0, 0.05); /* Couleur d'arrière-plan au survol */
}

/* Icônes de statut */
.status-icon-f {
    width: 24px; /* Utilisation d'une valeur normale */
    height: 24px; /* Utilisation d'une valeur normale */
    display: inline-block;
    vertical-align: middle;
    border: none! important;
    flex-shrink: 0;
    /* S'assurer que l'icône ne se déforme pas */
}


/* Réinitialisation des styles d'image */
.medication-item img {
    max-width: none;
    padding: 0;
    margin-right: 8px;
    margin-bottom: 6px;
}

.improved-pagination {
    margin-top: 20px;
    text-align: center;
}

.improved-pagination .page-numbers {
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

.improved-pagination .current {
    background-color: var(--theme-color);
    color: #fc3f83;
}

#medication-results-skeleton {
    min-height: 300px;
}

.skeleton-item {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin-bottom: 10px;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}



/* Styles pour la fiche médicament */
.medication-container {
    width: 100%;
    max-width: 100%;
    padding: 20px 0px 20px 0px;
    margin: 0 auto;
}
.medication-sheet {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}
/* En-tête */
.medication-header {
    text-align: left;
    margin-bottom: 2rem;
    position: relative;
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.status-and-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.medication-title {
    font-size: 24px;
    margin: 0;
}

.medication-subtitle {
    font-size: 16px;
    line-height: 1.2;
    color: #666;
    margin: 0 0 10px 0;
}

.title-separator {
    width: 100%;
    border: none;
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

.medication-icons {
    display: flex;
    justify-content: flex-start;  /* Aligner les icônes à gauche */
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0.2rem;  /* Espacement réduit entre le titre et les icônes */
}
.medication-icons img, .status-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    border: none !important;
}
.help-link {
    font-size: 0.7rem;
    margin-top: 0.5rem;  /* Espacement entre les icônes et le lien d'aide */
}

/* Contenu */
.medication-content {
    color: #444;
}
.info-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.info-item {
    display: flex;
    flex-direction: column;
}
.info-item.full-width {
    grid-column: 1 / -1;
}
.label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.value {
    color: #333;
    font-weight: 500;
}

/* Réserver de l'espace pour l'image principale */
.featured-image-container {
    min-height: 300px; /* Ajustez selon la hauteur moyenne de vos images */
    display: flex;
    align-items: center;
    justify-content: center;
}

.centered-image {
    max-width: 100%;
    height: auto;
    max-height: 300px; /* Assurez-vous que cela correspond à min-height ci-dessus */
    object-fit: contain;
}

.pricing-section {
    background-color: #f5f5f5;
    padding: 1em;
    margin-bottom: 2em;
    border-radius: 5px;
}

.pricing-section h2 {
    margin-top: 0;
}

.price-item {
    margin-bottom: 0.5em;
}

.reimbursement-condition {
    font-style: italic;
    margin-top: 1em;
}

.indications-section {
    margin-top: 2em;
    border-top: 1px solid #ddd;
    padding-top: 1em;
}

.non-reimbursable {
    font-weight: bold;
    color: #d32f2f;
}

/* Réserver de l'espace pour les sections qui peuvent apparaître ou disparaître */
.pricing-section,
.indications-section,
.tags-section,
.generics-section {
    min-height: 50px; /* Ajustez selon vos besoins */
}

/* Tags */
.tags-section {
    margin: 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}
.tag {
    display: inline-block;
    background-color: #ffffff;
    color: #2d3748;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin: 0.25rem;
    font-weight: 500;
    border: 1px solid #000000;
    transition: all 0.2s ease;
}
.tag:hover {
    background-color: #f7fafc;
}

/* Section génériques */
.generics-section {
    margin-top: 2rem;
}

.generics-section h2 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.generics-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Augmenté pour plus d'espace entre les éléments de la liste */
}

.generics-list li {
    position: relative;
    padding-left: 1.2rem;
    line-height: 1.2; /* Maintient l'interligne réduit au sein d'un même générique */
}

.generics-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: -0.1em;
    color: #2b6cb0;
    font-size: 1.2em;
}

.generics-list a {
    color: #2b6cb0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.generics-list a:hover {
    color: #1a4971;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .medication-sheet {
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
    }
    .medication-title {
        font-size: 1.25rem;
    }

    .medication-icons img,
    .status-icon {
        width: 28px;
        height: 28px;
    }
    
    .featured-image-container {
        min-height: 200px;
    }
    
    .centered-image {
        max-height: 200px;
    }

    .info-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .label {
        font-size: 0.8rem;
    }
    .value {
        font-size: 0.9rem;
    }
}


/* Ajout d'un breakpoint supplémentaire pour les très petits écrans */
@media (max-width: 375px) {
    .info-group {
        gap: 0.75rem;
    }
    .label {
        font-size: 0.75rem;
    }
    .value {
        font-size: 0.85rem;
    }
}

.epcl-demo-tool.hide-on-mobile.hide-on-tablet {
  display: none;
}

img.wp-image-1056.size-full.loaded, img.wp-image-1059.loaded {
border : none;
}

 #app-download-popup {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #fff;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            border-top: 4px solid #ff3982;
            padding: 10px;
        }
        .close-popup {
            position: absolute;
            top: 3px;
            left: 10px;
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
        }
        .popup-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 15px;
        }
        .popup-text {
            flex: 1;
            text-align: left;
            padding-right: 15px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 80px;
        }
        .popup-text p {
            margin: 0;
            font-size: 14px;
           line-height: 1.5; /* Réduire l'interligne */
        }
        .popup-logo {
            flex-shrink: 0;
        }
        .popup-logo img {
            border-radius: 8px;
            width: 80px;
            height: 80px;
           border: 1px solid black;
        }
        .download-button {
            display: inline-block;
            background-color: #d32f2f;
            color: white;
            padding: 4px 20px;
            text-decoration: none;
            border-radius: 5px;
            font-size: 12px;
            align-self: flex-start;
            margin-top: 4px;
        }
        @media (min-width: 768px) {
            #app-download-popup {
                display: none !important;
            }
        }






