/**
 * DSA Cursos Manuales - Frontend styles
 *
 * Identidad visual coherente con dayservicesagency.com:
 *   - Negro corporativo #0f172a
 *   - Dorado #f2c94c
 *   - Tipografia heredada del tema
 */

/* ====== Gate del password ====== */

.dsa-cm-gate {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
}

.dsa-cm-gate__inner {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.dsa-cm-gate__media {
    background: #f6f7f7;
}

.dsa-cm-gate__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
}

.dsa-cm-gate__body {
    padding: 32px;
}

.dsa-cm-gate__title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
}

.dsa-cm-gate__excerpt {
    margin: 0 0 20px;
    color: #475569;
    font-size: 15px;
    line-height: 1.55;
}

.dsa-cm-gate__lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.dsa-cm-gate__lock .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.dsa-cm-gate__intro {
    margin: 0 0 24px;
    color: #1d293d;
    font-size: 15px;
    line-height: 1.55;
}

.dsa-cm-gate__notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    border-left-width: 4px;
    border-left-style: solid;
}

.dsa-cm-gate__notice--error {
    background: #fef2f2;
    color: #7f1d1d;
    border-left-color: #dc2626;
}

.dsa-cm-gate__notice--info {
    background: #eff6ff;
    color: #1e3a8a;
    border-left-color: #2563eb;
}

.dsa-cm-gate__form {
    margin: 0 0 24px;
}

.dsa-cm-gate__label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

.dsa-cm-gate__input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dsa-cm-gate__input:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.dsa-cm-gate__input:disabled {
    background: #f6f7f7;
    color: #94a3b8;
}

.dsa-cm-gate__button {
    display: inline-block;
    width: 100%;
    margin-top: 14px;
    padding: 14px 24px;
    background: linear-gradient(90deg, #f2c94c 0%, #f6d365 30%, #f9e07f 50%, #f6d365 70%, #f2c94c 100%);
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 100ms ease, box-shadow 150ms ease;
}

.dsa-cm-gate__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(242, 201, 76, 0.35);
}

.dsa-cm-gate__button:active {
    transform: translateY(0);
}

.dsa-cm-gate__button:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dsa-cm-gate__help {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.dsa-cm-gate__help a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.dsa-cm-gate__help a:hover {
    text-decoration: underline;
}

/* ====== Contenedor del listado de modulos ====== */

.dsa-cm-single__modulos {
    margin: 40px 0;
}

.dsa-cm-single__modulos-title {
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f2c94c;
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
}

.dsa-cm-modulos {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ====== Modulo (base) ====== */

.dsa-cm-modulo {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}

.dsa-cm-modulo__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.dsa-cm-modulo__index {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.dsa-cm-modulo__header-text {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dsa-cm-modulo__titulo {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    min-width: 200px;
}

.dsa-cm-modulo__badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dsa-cm-modulo__badge--pdf {
    background: #fef2f2;
    color: #b91c1c;
}

.dsa-cm-modulo__badge--video {
    background: #eff6ff;
    color: #1d4ed8;
}

.dsa-cm-modulo__badge--imagen {
    background: #ecfdf5;
    color: #047857;
}

.dsa-cm-modulo__badge--link {
    background: #f5f3ff;
    color: #6d28d9;
}

.dsa-cm-modulo__meta {
    display: inline-block;
    padding: 4px 10px;
    background: #f6f7f7;
    color: #64748b;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.dsa-cm-modulo__descripcion {
    margin: 0 0 16px;
    color: #475569;
    font-size: 15px;
    line-height: 1.55;
}

/* ====== Embed: PDF ====== */

.dsa-cm-modulo__embed {
    position: relative;
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f7f7;
}

.dsa-cm-modulo__embed--pdf {
    height: 720px;
    max-height: 80vh;
}

.dsa-cm-modulo__embed--pdf iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ====== Embed: Video con aspect ratio 16:9 ====== */

.dsa-cm-modulo__embed--video {
    aspect-ratio: 16 / 9;
}

.dsa-cm-modulo__embed--video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.dsa-cm-modulo__embed--video-servidor {
    aspect-ratio: 16 / 9;
}

.dsa-cm-modulo__embed--video-servidor video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* ====== Imagen ====== */

.dsa-cm-modulo__imagen {
    margin: 16px 0 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f6f7f7;
}

.dsa-cm-modulo__imagen a {
    display: block;
    line-height: 0;
}

.dsa-cm-modulo__imagen img {
    width: 100%;
    height: auto;
    display: block;
}

/* ====== Actions: botones ====== */

.dsa-cm-modulo__actions {
    margin: 16px 0 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dsa-cm-modulo__button {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    transition: transform 100ms ease, box-shadow 150ms ease, background 150ms ease;
    border: 1px solid transparent;
}

.dsa-cm-modulo__button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.dsa-cm-modulo__button--primary {
    background: linear-gradient(90deg, #f2c94c 0%, #f6d365 50%, #f2c94c 100%);
    color: #0f172a;
}

.dsa-cm-modulo__button--primary:hover {
    box-shadow: 0 6px 16px rgba(242, 201, 76, 0.35);
    color: #0f172a;
}

.dsa-cm-modulo__button--secondary {
    background: #0f172a;
    color: #ffffff;
}

.dsa-cm-modulo__button--secondary:hover {
    background: #1e293b;
    color: #ffffff;
}

.dsa-cm-modulo__button--ghost {
    background: transparent;
    color: #0f172a;
    border-color: #cbd5e1;
}

.dsa-cm-modulo__button--ghost:hover {
    background: #f6f7f7;
    border-color: #94a3b8;
    color: #0f172a;
}

/* ====== Boton de logout del curso ====== */

.dsa-cm-single__logout {
    margin: 32px 0 0;
    text-align: center;
}

.dsa-cm-logout-form__button {
    padding: 8px 18px;
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 150ms ease;
}

.dsa-cm-logout-form__button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* ====== Responsive ====== */

@media (max-width: 600px) {
    .dsa-cm-modulo {
        padding: 16px;
    }

    .dsa-cm-modulo__embed--pdf {
        height: 480px;
    }

    .dsa-cm-modulo__actions {
        flex-direction: column;
    }

    .dsa-cm-modulo__button {
        width: 100%;
        justify-content: center;
    }
}
