/* Estodas - Guía de tallas
   Estilos autocontenidos. Sin dependencias de librerías externas. */

.esg-wrapper {
    margin: 10px 0;
}

/* --- Botón de apertura --- */
.esg-open-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    background: #f6f6f6;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.esg-open-btn:hover,
.esg-open-btn:focus {
    background: #ececec;
    border-color: #999;
    outline: none;
}

.esg-open-btn i {
    margin-right: 6px;
}

/* --- Overlay --- */
.esg-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.esg-overlay.esg-visible {
    display: block;
}

/* --- Modal --- */
.esg-modal {
    position: relative;
    max-width: 560px;
    margin: 50px auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.esg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
}

.esg-modal-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: #333;
}

.esg-close-btn {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}

.esg-close-btn:hover,
.esg-close-btn:focus {
    color: #333;
    outline: none;
}

.esg-modal-body {
    padding: 18px;
    max-height: 70vh;
    overflow-y: auto;
}

/* --- Contenido por defecto --- */
.esg-modal-body .esg-intro,
.esg-modal-body .esg-note {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
}

.esg-modal-body .esg-note {
    margin-top: 12px;
    font-style: italic;
}

.esg-modal-body .esg-subtitle {
    margin: 16px 0 8px;
    font-size: 15px;
    color: #333;
}

.esg-modal-body .esg-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
    font-size: 14px;
}

.esg-modal-body .esg-table th,
.esg-modal-body .esg-table td {
    border: 1px solid #e0e0e0;
    padding: 7px 10px;
    text-align: center;
}

.esg-modal-body .esg-table thead th {
    background: #f4f4f4;
    color: #333;
    font-weight: 600;
}

.esg-modal-body .esg-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .esg-modal {
        margin: 20px 12px;
    }
}
