/* Opmeit_Facturacion Lite v0.1.0 */

.opf-portal {
    --opf-primary: #ce1225;
    --opf-primary-hover: #a80d1e;
    --opf-dark: #172b45;
    --opf-muted: #64748b;
    --opf-border: #e2e8f0;

    max-width: 1050px;
    margin: 35px auto 65px;
    padding: 0 18px;
    color: var(--opf-dark);
    font-family: inherit;
    box-sizing: border-box;
}

.opf-portal *,
.opf-portal *::before,
.opf-portal *::after {
    box-sizing: border-box;
}

.opf-header {
    text-align: center;
    margin-bottom: 34px;
}

.opf-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--opf-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.opf-header h1 {
    margin: 0 0 12px;
    color: var(--opf-dark);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 750;
    line-height: 1.2;
}

.opf-header p {
    max-width: 540px;
    margin: 0 auto;
    color: var(--opf-muted);
    font-size: 15px;
    line-height: 1.7;
}

.opf-container {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--opf-border);
    border-radius: 16px;
    box-shadow: 0 12px 45px rgba(23, 43, 69, .055);
}

.opf-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--opf-border);
}

.opf-tab {
    position: relative;
    flex: 1;
    min-height: 68px;
    padding: 18px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--opf-muted);
    font-size: 15px;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.opf-tab:hover {
    background: #fff;
    color: var(--opf-dark);
}

.opf-tab.is-active {
    background: #fff;
    color: var(--opf-primary);
}

.opf-tab.is-active::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--opf-primary);
    content: "";
}

.opf-panel {
    padding: 38px 45px 45px;
}

.opf-panel[hidden],
.opf-result[hidden],
.opf-result a[hidden] {
    display: none !important;
}

.opf-panel h2 {
    margin: 0 0 8px;
    color: var(--opf-dark);
    font-size: 23px;
    font-weight: 700;
}

.opf-description {
    margin: 0 0 30px;
    color: var(--opf-muted);
    font-size: 14px;
    line-height: 1.6;
}

.opf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 23px 25px;
}

.opf-full {
    grid-column: 1 / -1;
}

.opf-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.opf-field label {
    display: block;
    margin-bottom: 9px;
    color: var(--opf-dark);
    font-size: 13px;
    font-weight: 650;
}

.opf-field input,
.opf-field select {
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #d7dfe8;
    border-radius: 8px;
    background-color: #fff;
    color: var(--opf-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s;
}

.opf-field input::placeholder {
    color: #94a3b8;
}

.opf-field input:focus,
.opf-field select:focus {
    border-color: var(--opf-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(206, 18, 37, .1);
}

.opf-divider {
    margin-top: 10px;
    padding-top: 24px;
    border-top: 1px solid var(--opf-border);
}

.opf-divider h3 {
    margin: 0;
    color: var(--opf-dark);
    font-size: 17px;
    font-weight: 700;
}

.opf-submit {
    display: block;
    width: 100%;
    min-height: 52px;
    margin-top: 32px;
    padding: 13px 22px;
    border: 1px solid var(--opf-primary);
    border-radius: 9px;
    background: var(--opf-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.opf-submit:hover,
.opf-submit:focus {
    background: var(--opf-primary-hover);
    border-color: var(--opf-primary-hover);
    color: #fff;
}

.opf-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.opf-result {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--opf-border);
    border-radius: 9px;
    background: #f8fafc;
}

.opf-result p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.opf-result.is-success {
    border-color: #b7dfc8;
    background: #f0fdf4;
}

.opf-result.is-error {
    border-color: #fecaca;
    background: #fff5f5;
}

.opf-result a {
    display: inline-block;
    margin-top: 12px;
    color: var(--opf-primary);
    font-weight: 700;
    text-decoration: underline;
}

.opf-tab:focus-visible,
.opf-submit:focus-visible,
.opf-result a:focus-visible {
    outline: 3px solid rgba(206, 18, 37, .35);
    outline-offset: 2px;
}

/* Tablet */
@media (max-width: 768px) {
    .opf-portal {
        margin: 24px auto 45px;
    }

    .opf-panel {
        padding: 28px 24px 34px;
    }

    .opf-grid {
        gap: 20px;
    }
}

/* Movil */
@media (max-width: 600px) {
    .opf-portal {
        padding: 0 10px;
    }

    .opf-header {
        margin-bottom: 25px;
    }

    .opf-header p {
        font-size: 14px;
    }

    .opf-container {
        border-radius: 12px;
    }

    .opf-tab {
        min-height: 60px;
        padding: 15px 8px;
        font-size: 13px;
    }

    .opf-panel {
        padding: 26px 20px 30px;
    }

    .opf-panel h2 {
        font-size: 21px;
    }

    .opf-grid {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .opf-full {
        grid-column: auto;
    }

    .opf-field input,
    .opf-field select {
        height: 50px;
        font-size: 16px;
    }

    .opf-submit {
        min-height: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opf-portal *,
    .opf-portal *::before,
    .opf-portal *::after {
        transition: none !important;
    }
}


/* OPF-INSTRUCTIONS-V1 */

.opf-portal {
    max-width: 1300px;
}

.opf-layout {
    display: grid;
    grid-template-columns: minmax(245px, 285px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.opf-layout > .opf-container {
    min-width: 0;
}

.opf-instructions {
    padding: 27px 23px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 45px rgba(23,43,69,.055);
}

.opf-instructions-eyebrow {
    margin: 0 0 9px;
    color: #ce1225;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.opf-instructions h2 {
    margin: 0 0 26px;
    color: #172b45;
    font-size: 21px;
    font-weight: 700;
}

.opf-instructions-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: opf-step;
}

.opf-instructions-list li {
    position: relative;
    min-height: 40px;
    margin: 0 0 25px;
    padding-left: 44px;
    counter-increment: opf-step;
}

.opf-instructions-list li::before {
    content: counter(opf-step, decimal-leading-zero);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #fff0f2;
    color: #ce1225;
    font-size: 11px;
    font-weight: 700;
}

.opf-instructions-list strong {
    display: block;
    margin-bottom: 5px;
    color: #172b45;
    font-size: 13px;
}

.opf-instructions-list span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
}

.opf-instructions-note {
    margin-top: 10px;
    padding: 15px;
    background: #f4f6fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.opf-instructions-note p {
    margin: 5px 0 0;
    color: #64748b;
}

.opf-instructions-help {
    margin: 22px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.opf-instructions-help a {
    color: #ce1225;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 950px) {
    .opf-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .opf-instructions {
        padding: 24px 20px;
    }

    .opf-instructions-list li {
        margin-bottom: 18px;
    }
}

/* OPF-CASA-MARCUS-PALETTE-V1 */

.opf-portal {
    --opf-primary: #26245f;
    --opf-primary-hover: #191747;
}

.opf-field input:focus,
.opf-field select:focus {
    box-shadow: 0 0 0 3px rgba(38,36,95,.12);
}

.opf-instructions-list li::before {
    background: #f0f1fa;
    color: #26245f;
}

.opf-instructions-help a {
    color: #26245f;
}

.opf-tab:focus-visible,
.opf-submit:focus-visible {
    outline-color: rgba(38,36,95,.35);
}


/* OPF-MODAL-V1 */

.opf-portal .opf-modal {
    width: min(460px, calc(100% - 32px));
    max-width: 460px;
    max-height: 90vh;
    padding: 0;
    margin: auto;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    color: #172b45;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .20);
}

.opf-portal .opf-modal:not([open]) {
    display: none !important;
}

.opf-portal .opf-modal::backdrop {
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(3px);
}

.opf-modal-content {
    position: relative;
    padding: 38px 34px 30px;
    text-align: center;
}

.opf-portal .opf-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f8;
    color: #64748b;
    font-size: 23px;
    cursor: pointer;
}

.opf-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #eef0fa;
    color: #26245f;
    font-size: 34px;
    font-weight: 700;
}

.opf-modal-eyebrow {
    margin: 0 0 10px;
    color: #26245f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.opf-modal-content h2 {
    margin: 0 0 13px;
    color: #172b45;
    font-size: 23px;
    font-weight: 750;
    line-height: 1.3;
}

.opf-modal-content > p:not(.opf-modal-eyebrow) {
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.opf-modal-file {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0 20px;
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    text-align: left;
}

.opf-modal-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 49px;
    height: 49px;
    border-radius: 10px;
    background: #e9eaf6;
    color: #26245f;
    font-size: 13px;
    font-weight: 800;
}

.opf-modal-file strong {
    display: block;
    color: #172b45;
    font-size: 13px;
}

.opf-modal-file p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 12px;
}

.opf-portal .opf-modal-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 51px;
    padding: 13px 20px;
    border-radius: 9px;
    background: #26245f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s;
}

.opf-portal .opf-modal-download:hover {
    background: #191747;
    color: #fff;
    text-decoration: none;
}

.opf-modal-content .opf-modal-email {
    margin: 22px 0 0;
    font-size: 12px;
}

.opf-portal .opf-modal-secondary {
    margin-top: 16px;
    padding: 9px 22px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.opf-portal .opf-modal-secondary:hover {
    background: #f1f3f8;
    color: #172b45;
}

.opf-portal .opf-modal button:focus-visible,
.opf-portal .opf-modal a:focus-visible {
    outline: 3px solid #8c90d6;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .opf-modal-content {
        padding: 34px 22px 25px;
    }

    .opf-modal-content h2 {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opf-portal .opf-modal-download {
        transition: none;
    }
}


/* OPF-BUSCAR-FOLIO-STATUS-V1 */

.opf-folio-status {
    margin: 8px 0 0;
    color: #26245f;
    font-size: 12px;
    line-height: 1.5;
}

.opf-folio-status[hidden] {
    display: none !important;
}

.opf-folio-status.is-error {
    color: #b42335;
}

.opf-portal button.opf-modal-download {
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

/* OPF-TOP-SPACING-V1 */

/* Solo pagina de pruebas de facturacion */
body.cms-facturacion-dev .page-title-wrapper {
    display: none !important;
}

body.cms-facturacion-dev .page-main {
    padding-top: 0;
}

body.cms-facturacion-dev #opf-portal {
    margin-top: 0;
}

/* OPF-TABS-V2 */

.opf-portal .opf-tabs {
    gap: 10px;
    padding: 10px;
    background: #f4f6fa;
    border-bottom: 1px solid #e2e8f0;
}

.opf-portal .opf-tab {
    min-height: 62px;
    padding: 15px 12px;
    background: #fff;
    border: 1px solid #d9dfeb;
    border-radius: 10px;
    color: #26245f;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    box-shadow: none;
    transition: background .2s, color .2s, border-color .2s;
}

.opf-portal .opf-tab.is-active {
    background: #26245f;
    border-color: #26245f;
    color: #fff;
    box-shadow: 0 3px 9px rgba(38, 36, 95, .15);
}

.opf-portal .opf-tab.is-active::after {
    display: none;
}

.opf-portal .opf-tab:hover:not(.is-active) {
    background: #e9edfa;
    border-color: #bfc6e0;
    color: #26245f;
}

.opf-portal .opf-tab.is-active:hover {
    background: #191747;
    color: #fff;
}

@media (max-width: 600px) {
    .opf-portal .opf-tabs {
        gap: 7px;
        padding: 7px;
    }

    .opf-portal .opf-tab {
        min-height: 55px;
        padding: 10px 7px;
        font-size: 12px;
        border-radius: 8px;
    }
}
