/* Solicitud de Chequeo Médico V2 — Figma / AC */

body.layout-integracion section.content-common {
    overflow: visible;
    background: var(--Gray-10, #F2F2F2);
}

.cmv2-page {
    background: var(--Gray-10, #F2F2F2);
    min-height: calc(100vh - 220px);
    padding: 32px 16px 64px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.cmv2-card {
    width: 100%;
    max-width: 720px;
    background: var(--Gray-00, #FCFCFC);
    border: 1px solid var(--Gray-35, #D6D6D6);
    border-radius: 16px;
    padding: 16px;
}

/* Intro */
.cmv2-intro-title {
    margin: 0 0 8px;
    color: var(--Primary-100, #064350);
}

.cmv2-intro-desc {
    margin: 0;
    color: var(--Gray-85, #1B1D1F);
}

.cmv2-intro-divider {
    margin: 16px 0 0;
    border: 0;
    border-top: 1px solid var(--Gray-35, #D6D6D6);
}

/* Stepper */
.cmv2-stepper {
    margin: 24px 0 8px;
    padding: 0 8%;
}

.cmv2-stepper-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.cmv2-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 32px;
    flex-shrink: 0;
}

.cmv2-step-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--Gray-35, #D6D6D6);
    background: var(--Gray-00, #FCFCFC);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.cmv2-step-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
}

.cmv2-step-check {
    display: none;
    width: 14px;
    height: 14px;
}

.cmv2-step-label {
    margin-top: 6px;
    color: var(--Gray-65, #7C7F80);
}

.cmv2-stepper-line {
    flex: 1;
    height: 1.5px;
    background: var(--Gray-35, #D6D6D6);
    margin: 11px 8px 0;
    min-width: 40px;
}

/* Current */
.cmv2-step.is-current .cmv2-step-circle {
    border-color: var(--Primary-50, #086378);
    background: var(--Gray-00, #FCFCFC);
}

.cmv2-step.is-current .cmv2-step-dot {
    background: var(--Green-10, #BAD431);
}

.cmv2-step.is-current .cmv2-step-label {
    color: var(--Primary-100, #064350);
    font-weight: 700;
}

/* Completed */
.cmv2-step.is-completed .cmv2-step-circle {
    border-color: var(--Primary-50, #086378);
    background: var(--Primary-50, #086378);
}

.cmv2-step.is-completed .cmv2-step-dot {
    display: none;
}

.cmv2-step.is-completed .cmv2-step-check {
    display: block;
}

.cmv2-step.is-completed .cmv2-step-label {
    color: var(--Primary-100, #064350);
}

.cmv2-stepper-line.is-completed {
    background: var(--Primary-50, #086378);
}

/* Section header */
.cmv2-section-header {
    margin-top: 16px;
}

.cmv2-section-title {
    margin: 0 0 4px;
    color: var(--Primary-100, #064350);
}

.cmv2-section-hint {
    margin: 0;
    color: var(--Gray-85, #1B1D1F);
}

.cmv2-fields {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cmv2-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmv2-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--Gray-85, #1B1D1F);
    margin: 0;
}

.cmv2-required {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--Error-60, #CF2525);
    flex-shrink: 0;
}

.cmv2-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid var(--Gray-35, #D6D6D6);
    border-radius: 8px;
    background: var(--Gray-00, #FCFCFC);
    color: var(--Gray-85, #1B1D1F);
    font-family: inherit;
    font-size: 16px;
    line-height: 125%;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

select.cmv2-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23086378' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.cmv2-input:focus {
    border-color: var(--Primary-50, #086378);
    box-shadow: 0 0 0 3px var(--Primary-50-10, rgba(8, 99, 120, 0.1));
}

.cmv2-input:disabled {
    color: var(--Gray-65, #7C7F80);
    background-color: var(--Gray-20, #E7EBED);
    border-color: transparent;
    cursor: not-allowed;
}

.cmv2-input.is-error {
    border-color: var(--Error-60, #CF2525);
    background-color: var(--Error-25, #FFF8F8);
}

.cmv2-textarea {
    min-height: 120px;
    resize: vertical;
}

.cmv2-char-count {
    text-align: right;
    margin-top: 4px;
}

.cmv2-input-with-btn {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--Gray-35, #D6D6D6);
    border-radius: 8px;
    overflow: hidden;
    background: var(--Gray-00, #FCFCFC);
}

.cmv2-input-with-btn .cmv2-input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    min-width: 0;
}

.cmv2-input-with-btn:focus-within {
    border-color: var(--Primary-50, #086378);
    box-shadow: 0 0 0 3px var(--Primary-50-10, rgba(8, 99, 120, 0.1));
}

.cmv2-btn-buscar {
    flex-shrink: 0;
    border-radius: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 1px solid var(--Gray-35, #D6D6D6) !important;
    white-space: nowrap;
    padding: 10px 16px !important;
}

/* Actions */
.cmv2-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.cmv2-btn-action {
    min-width: 160px;
    justify-content: center;
}

/* Success */
.cmv2-success-card {
    max-width: 720px;
}

.cmv2-success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 8px 8px;
    gap: 12px;
}

.cmv2-success-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.cmv2-success-icon {
    width: 176px;
    height: 136px;
    display: block;
    object-fit: contain;
}

.cmv2-success-title,
.cmv2-success-subtitle,
.cmv2-success-body {
    margin: 0;
    max-width: 560px;
}

.cmv2-success-ref {
    margin: 8px 0 0;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--Primary-2, #E4EDEF);
}

.cmv2-success-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Modal error */
.cmv2-modal[hidden] {
    display: none !important;
}

.cmv2-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cmv2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 29, 31, 0.45);
}

.cmv2-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: var(--Gray-00, #FCFCFC);
    border-radius: 16px;
    padding: 32px 24px 28px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(6, 67, 80, 0.16);
}

.cmv2-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--Gray-35, #D6D6D6);
    background: var(--Gray-00, #FCFCFC);
    color: var(--Primary-100, #064350);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.cmv2-modal-close:hover {
    background: var(--Gray-10, #F2F2F2);
}

.cmv2-modal-illustration {
    margin-bottom: 8px;
}

.cmv2-modal-title {
    margin: 0 0 8px;
}

.cmv2-modal-subtitle {
    margin: 0 0 12px;
}

.cmv2-modal-body {
    margin: 0;
}

/* Responsive — tablet / mobile */
@media (max-width: 768px) {
    .cmv2-page {
        padding: 16px 12px 48px;
    }

    .cmv2-stepper {
        padding: 0 4%;
    }

    .cmv2-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .cmv2-btn-action {
        width: 100%;
        min-width: 0;
    }

    .cmv2-success-actions {
        justify-content: stretch;
    }

    .cmv2-success-actions .cmv2-btn-action {
        width: 100%;
    }

    .cmv2-success-content {
        text-align: center;
    }

    .cmv2-input-with-btn {
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .cmv2-btn-buscar {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}
