.service-yearbook-popup-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    padding: 20px 24px;

    border-bottom: 1px solid #e5e5e5;

}

.service-yearbook-popup-header-text {

    flex: 1;

}

.service-yearbook-popup-title {

    margin: 0;

    font-size: 1.8rem;

    color: #04034e;

}

.service-yearbook-popup-description {

    margin: 8px 0 0 0;

    font-size: 1rem;

    font-weight: 400;

    color: #6c757d;

    line-height: 1.5;

}

/*====================================================
CLOSE BUTTON
====================================================*/

.service-yearbook-popup-close {

    display: flex;

    justify-content: center;

    align-items: center;

    flex-shrink: 0;

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 50%;

    background: transparent !important;

    color: #ff0019 !important;

    font-size: 26px;

    cursor: pointer;

    transition: all .25s ease;

}

.service-yearbook-popup-close:hover {

    transform: rotate(90deg);

}

.service-yearbook-popup-close i {

    pointer-events: none;

}

/*====================================================
POPUP
====================================================*/

.service-yearbook-popup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .70);
    z-index: 999999;
    padding: 20px;
}

.service-yearbook-popup-overlay.is-open {
    display: flex;
}

.service-yearbook-popup-container {

    width: min(1000px, 95vw);

    height: 96vh;

    max-height: 96vh;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    background: #f1efef;

    border-radius: 14px;

    box-shadow: 0 20px 60px rgba(0,0,0,.30);

}

.service-yearbook-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}
/*====================================================
CUSTOM SELECTOR
====================================================*/

.service-yearbook-selector {

    position: relative;

    overflow:visible;

    width: 60%;

    margin-left: 5%;

    margin-right: auto;

}

.service-yearbook-selector-selected{

    display:flex;

    align-items:center;

    gap:18px;

    padding:16px;

    background:#ffffff;

    border:1px solid var(--yb-border);

    border-radius:12px;

    cursor:pointer;

    transition:.25s;

    overflow: visible

}

.service-yearbook-selector-selected:hover{

    border-color:var(--yb-primary);

    box-shadow:0 4px 15px rgba(13,110,253,.10);

}

.service-yearbook-selector-image{

    flex-shrink:0;

}

.service-yearbook-selector-image img{

    width:90px;

    height:70px;

    border-radius:10px;

    object-fit:cover;

    display:block;

}

/* =========================================================
   PREVIEW FLOTANTE DE IMAGEN
========================================================= */

.service-yearbook-image-preview {
    position: fixed;
    width: 260px;
    height: 200px;
    padding: 8px;

    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, .25);

    display: none;

    align-items: center;
    justify-content: center;

    pointer-events: none;

    z-index: 9999999;

    box-sizing: border-box;
}

.service-yearbook-image-preview img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 6px;

    display: block;
}

/* =========================================================
   PREVIEW GRANDE DE IMAGEN AL PASAR EL MOUSE
========================================================= */

.service-yearbook-selector-image {
    position: relative;
    cursor: zoom-in;
    z-index: 20;
}

.service-yearbook-selector-image img {
    width: 90px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    display: block;

    transform-origin: left center;
    transition: transform 0.25s ease;
}


/* =========================================================
   IMAGEN AMPLIADA AL PASAR EL MOUSE
========================================================= */

.service-yearbook-selector-image:hover img {
    transform: scale(3.5);
}

.service-yearbook-selector-text{

    flex:1;

}

.service-yearbook-selector-title{

    font-size:1.1rem;

    font-weight:700;

    color:#04034e;

    margin-bottom:6px;

}

.service-yearbook-selector-description{

    color:#6c757d;

    font-size:.92rem;

    line-height:1.45;

}

.service-yearbook-selector-arrow{

    font-size:20px;

    color:#ff0000 !important;

    transition:.30s;

}

.service-yearbook-selector.open
.service-yearbook-selector-arrow{

    transform:rotate(180deg);

}

/* =========================================================
   DATOS DE LA INSTITUCIÓN
========================================================= */

.service-yearbook-institution {
    width: 100%;
    margin-bottom: 30px;
}

.service-yearbook-institution-title {
    width: 100%;
    margin-bottom: 20px;
}

.service-yearbook-institution-title h3 {
    margin: 0;
}


/* Contenedor de los campos */

.service-yearbook-institution-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}


/* Campo individual */

.service-yearbook-field {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Label */

.service-yearbook-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}


/* Inputs */

.service-yearbook-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff !important;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

/* Focus */

.service-yearbook-input:hover,
.service-yearbook-input:focus {
    border-color: #888 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Placeholder */

.service-yearbook-input::placeholder {
    color: #999;
}

/* =========================================================
   CANTIDAD DE EJEMPLARES
========================================================= */

.service-yearbook-quantity-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #ccc !important;
    border-radius: 6px;
    background: #fff !important;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.service-yearbook-quantity-input:hover,
.service-yearbook-quantity-input:focus {
    border-color: #888 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);

}

/*====================================================
OPTIONS
====================================================*/

.service-yearbook-selector-options{

    position:absolute;

    left:0;

    right:0;

    top:calc(100% + 8px);

    background:#e0dfdf;

    border:1px solid #000000;

    border-radius:12px;

    overflow:hidden;

    box-shadow:0 20px 40px rgba(0,0,0,.15);

    display:none;

    z-index:100;

    overflow: hidden;
}

.service-yearbook-selector.open
.service-yearbook-selector-options{

    display:block;

}

/*====================================================
OPTION
====================================================*/

.service-yearbook-selector-option{

    display:flex;

    align-items:center;

    gap:15px;

    padding:14px;

    cursor:pointer;

    transition:.20s;

    border-bottom:1px solid #eeeeee;

}

.service-yearbook-selector-option:last-child{

    border-bottom:none;

}

.service-yearbook-selector-option:hover{

    background:#f5f8ff;

}

.service-yearbook-selector-option.selected{

    background:#edf4ff;

}

.service-yearbook-selector-option-image{

    position: relative;
    flex-shrink: 0;
    z-index: 20;

}

.service-yearbook-selector-option-image {
    position: relative;
    flex-shrink: 0;
    z-index: 20;
}

.service-yearbook-selector-option-image img {
    width: 70px;
    height: 55px;
    border-radius: 8px;
    object-fit: cover;
    display: block;

    transform-origin: left center;
    transition: transform 0.25s ease;
}

.service-yearbook-selector-option-text{

    flex:1;

}

.service-yearbook-selector-option-title{

    font-weight:700;

    color:#04034e;

    margin-bottom:5px;

}

.service-yearbook-selector-option-description{

    color:#6b7280;

    font-size:.90rem;

    line-height:1.4;

}

/*====================================================
FOOTER
====================================================*/

.service-yearbook-popup-footer {

    display: flex;

    justify-content: flex-end;

    align-items: center;

    gap: 12px;

    padding: 20px 24px;

    border-top: 1px solid #e5e7eb;

    background: #ffffff;

}

/*====================================================
BUTTONS
====================================================*/

.service-yearbook-button {

    display: inline-flex;

    justify-content: center;

    align-items: center;

    min-width: 160px;

    height: 46px;

    padding: 0 22px;

    border-radius: 10px;

    border: none;

    font-size: .95rem;

    font-weight: 600;

    cursor: pointer;

    transition: all .25s ease;

    text-decoration: none;

    white-space: nowrap;

}

.service-yearbook-button:focus {

    outline: none;

    box-shadow: 0 0 0 4px rgba(13,110,253,.15);

}

/*====================================================
PRIMARY
====================================================*/

.service-yearbook-button-primary {

    background: #135f84 !important;

    color: #ffffff !important;

     box-shadow: 0 8px 18px rgba(13,110,253,.25);

}

.service-yearbook-button-primary:hover {

    transform: translateY(-2px);

}

/*====================================================
SECONDARY
====================================================*/

.service-yearbook-button-secondary {

    background: #135f84 !important;

    color: #ffffff !important;

    box-shadow: 0 8px 18px rgba(13,110,253,.25);

}

.service-yearbook-button-secondary:hover {

    transform: translateY(-2px);

}

/* =========================================================
   MULTI CHECK / RADIO
========================================================= */

.service-yearbook-multicheck-category {
    width: 60%;
    margin-left: 5%;
    margin-bottom: 30px;
}

.service-yearbook-multicheck-title {
    width: 100%;
    margin-bottom: 15px;
}

.service-yearbook-multicheck-title h3 {
    margin: 0;
}

/* =========================================================
   OPCIONES
========================================================= */

.service-yearbook-multicheck-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* =========================================================
   OPCIÓN INDIVIDUAL
========================================================= */

.service-yearbook-multicheck-option {
    width: 100%;
}

/* =========================================================
   LABEL
========================================================= */

.service-yearbook-multicheck-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 60%;
    margin-left: 5%;
    cursor: pointer;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease,
                background-color 0.2s ease;
}

.service-yearbook-multicheck-label:hover {
    border-color: #888;
    background-color: #f8f8f8;
}

/* =========================================================
   INPUT
========================================================= */

.service-yearbook-multicheck-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


/* =========================================================
   CHECKMARK
========================================================= */

.service-yearbook-multicheck-checkmark {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}


/* =========================================================
   CHECKBOX SELECCIONADO
========================================================= */

.service-yearbook-multicheck-input:checked + .service-yearbook-multicheck-checkmark {
    background-color: #333;
    border-color: #333;
}

.service-yearbook-multicheck-input:checked + .service-yearbook-multicheck-checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* =========================================================
   RADIO
========================================================= */

.service-yearbook-multicheck-input[type="radio"] + .service-yearbook-multicheck-checkmark {
    border-radius: 50%;
}

.service-yearbook-multicheck-input[type="radio"]:checked + .service-yearbook-multicheck-checkmark::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}


/* =========================================================
   TEXTO
========================================================= */

.service-yearbook-multicheck-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    font-size: 15px;
    line-height: 1.4;
}

.service-yearbook-multicheck-description {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: #777;
}


/* =========================================================
   OPCIÓN SELECCIONADA
========================================================= */

.service-yearbook-multicheck-input:checked ~ .service-yearbook-multicheck-text {
    font-weight: 600;
}


/* =========================================================
   GRUPOS
========================================================= */

.service-yearbook-multicheck-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.service-yearbook-multicheck-group {
    width: 100%;
}

.service-yearbook-multicheck-group-title {
    margin-bottom: 8px;
    font-weight: 600;
}

.service-yearbook-multicheck-group-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}


/* =========================================================
   CANTIDAD
========================================================= */

.service-yearbook-multicheck-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 0 42px;
}

.service-yearbook-multicheck-quantity label {
    font-size: 14px;
}

.service-yearbook-multicheck-quantity-input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    outline: none;
}

.service-yearbook-multicheck-quantity-input:hover,
.service-yearbook-multicheck-quantity-input:focus {
    border-color: #888;
}

.service-yearbook-multicheck-quantity-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   CAMPO "OTRO"
========================================================= */

.service-yearbook-multicheck-custom {
    margin: 8px 0 0 42px;
}

.service-yearbook-multicheck-custom-input {
    width: 100%;
    max-width: 500px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    outline: none;
}

.service-yearbook-multicheck-custom-input:hover,
.service-yearbook-multicheck-custom-input:focus {
    border-color: #888;
}

.service-yearbook-multicheck-custom-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.service-yearbook-client {
    width: 100%;
    margin-bottom: 30px;
}

.service-yearbook-client-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

/* =========================================================
   DESKTOP GRANDE / LAPTOP
   Hasta 1200px
   ========================================================= */

@media (max-width: 1200px) {

    .service-yearbook-popup-container {
        width: min(950px, 94vw);
    }

    .service-yearbook-selector {
        width: 70%;
    }

    .service-yearbook-multicheck-category {
        width: 70%;
    }

    .service-yearbook-multicheck-label {
        width: 70%;
    }

}


/* =========================================================
   TABLET / LAPTOP PEQUEÑA
   Hasta 992px
   ========================================================= */

@media (max-width: 992px) {

    .service-yearbook-popup-overlay {
        padding: 15px;
    }

    .service-yearbook-popup-container {
        width: 95vw;
        height: 94vh;
        max-height: 94vh;
    }

    /*
    ---------------------------------------------------------
    HEADER
    ---------------------------------------------------------
    */

    .service-yearbook-popup-header {
        padding: 18px 20px;
    }

    .service-yearbook-popup-title {
        font-size: 1.6rem;
    }

    /*
    ---------------------------------------------------------
    BODY
    ---------------------------------------------------------
    */

    .service-yearbook-popup-body {
        padding: 20px;
    }

    /*
    ---------------------------------------------------------
    CAMPOS
    3 columnas → 2 columnas
    ---------------------------------------------------------
    */

    .service-yearbook-institution-fields,
    .service-yearbook-client-fields {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    /*
    ---------------------------------------------------------
    SELECTORES
    ---------------------------------------------------------
    */

    .service-yearbook-selector {
        width: 80%;
        margin-left: 0;
    }

    /*
    ---------------------------------------------------------
    MULTICHECK
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-category {
        width: 80%;
        margin-left: 0;
    }

    .service-yearbook-multicheck-label {
        width: 100%;
        margin-left: 0;
    }

}


/* =========================================================
   TABLET / MÓVIL GRANDE
   Hasta 768px
   ========================================================= */

@media (max-width: 768px) {

    /*
    ---------------------------------------------------------
    POPUP
    ---------------------------------------------------------
    */

    .service-yearbook-popup-overlay {
        padding: 10px;
    }

    .service-yearbook-popup-container {
        width: 100%;
        height: 96vh;
        max-height: 96vh;
        border-radius: 10px;
    }

    /*
    ---------------------------------------------------------
    HEADER
    ---------------------------------------------------------
    */

    .service-yearbook-popup-header {
        padding: 15px 18px;
        gap: 12px;
    }

    .service-yearbook-popup-title {
        font-size: 1.4rem;
    }

    .service-yearbook-popup-description {
        font-size: .9rem;
    }

    .service-yearbook-popup-close {
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    /*
    ---------------------------------------------------------
    BODY
    ---------------------------------------------------------
    */

    .service-yearbook-popup-body {
        padding: 18px;
    }

    /*
    ---------------------------------------------------------
    CAMPOS
    2 columnas → 1 columna
    ---------------------------------------------------------
    */

    .service-yearbook-institution-fields,
    .service-yearbook-client-fields {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /*
    ---------------------------------------------------------
    SELECTORES
    ---------------------------------------------------------
    */

    .service-yearbook-selector {
        width: 100%;
        margin-left: 0;
    }

    /*
    ---------------------------------------------------------
    MULTICHECK
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-category {
        width: 100%;
        margin-left: 0;
    }

    .service-yearbook-multicheck-label {
        width: 100%;
        margin-left: 0;
    }

    /*
    ---------------------------------------------------------
    OPCIONES DE RADIO
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-group-options {
        flex-direction: column;
        gap: 10px;
    }

    /*
    ---------------------------------------------------------
    IMÁGENES
    ---------------------------------------------------------
    */

    .service-yearbook-selector-image img {
        width: 75px;
        height: 60px;
    }

    .service-yearbook-selector-option-image img {
        width: 60px;
        height: 48px;
    }

    /*
    ---------------------------------------------------------
    FOOTER
    ---------------------------------------------------------
    */

    .service-yearbook-popup-footer {
        padding: 15px 18px;
    }

    .service-yearbook-button {
        min-width: 140px;
    }

}


/* =========================================================
   MÓVIL
   Hasta 576px
   ========================================================= */

@media (max-width: 576px) {

    /*
    ---------------------------------------------------------
    POPUP
    ---------------------------------------------------------
    */

    .service-yearbook-popup-overlay {
        padding: 0;
    }

    .service-yearbook-popup-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    /*
    ---------------------------------------------------------
    HEADER
    ---------------------------------------------------------
    */

    .service-yearbook-popup-header {
        padding: 14px 15px;
    }

    .service-yearbook-popup-title {
        font-size: 1.25rem;
    }

    .service-yearbook-popup-description {
        font-size: .85rem;
        line-height: 1.4;
    }

    /*
    ---------------------------------------------------------
    BODY
    ---------------------------------------------------------
    */

    .service-yearbook-popup-body {
        padding: 15px;
    }

    /*
    ---------------------------------------------------------
    SELECTOR SELECCIONADO
    ---------------------------------------------------------
    */

    .service-yearbook-selector-selected {
        gap: 12px;
        padding: 12px;
    }

    .service-yearbook-selector-image img {
        width: 65px;
        height: 52px;
    }

    .service-yearbook-selector-title {
        font-size: 1rem;
    }

    .service-yearbook-selector-description {
        font-size: .85rem;
    }

    .service-yearbook-selector-arrow {
        font-size: 17px;
    }

    /*
    ---------------------------------------------------------
    OPTIONS DEL DROPDOWN
    ---------------------------------------------------------
    */

    .service-yearbook-selector-option {
        gap: 10px;
        padding: 10px;
    }

    .service-yearbook-selector-option-image img {
        width: 55px;
        height: 44px;
    }

    .service-yearbook-selector-option-title {
        font-size: .9rem;
    }

    .service-yearbook-selector-option-description {
        font-size: .82rem;
    }

    /*
    ---------------------------------------------------------
    PREVIEW GRANDE
    En móvil no mostramos el zoom flotante
    ---------------------------------------------------------
    */

    .service-yearbook-image-preview {
        display: none !important;
    }

    .service-yearbook-selector-image:hover img {
        transform: none;
    }

    /*
    ---------------------------------------------------------
    MULTICHECK
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-label {
        padding: 9px 10px;
    }

    .service-yearbook-multicheck-text {
        font-size: 14px;
    }

    .service-yearbook-multicheck-description {
        font-size: 12px;
    }

    /*
    ---------------------------------------------------------
    CANTIDAD
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-quantity {
        margin-left: 32px;
    }

    /*
    ---------------------------------------------------------
    CAMPO OTRO
    ---------------------------------------------------------
    */

    .service-yearbook-multicheck-custom {
        margin-left: 32px;
    }

    /*
    ---------------------------------------------------------
    FOOTER
    ---------------------------------------------------------
    */

    .service-yearbook-popup-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
        padding: 14px 15px;
    }

    .service-yearbook-button {
        width: 100%;
        min-width: 0;
        height: 44px;
    }

}