/* ============================================================
   cuenta-modal.css – Mines & Monarchs · Modal de Cuenta
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

.cm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 16px;
    box-sizing: border-box;
    overflow-y: auto;
}
.cm-overlay.active { display: flex; }

.cm-box {
    background: #110c05;
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    margin: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 60px rgba(255,215,0,0.07), 0 24px 80px rgba(0,0,0,0.7);
    animation: cmIn 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes cmIn {
    from { opacity:0; transform:translateY(-28px) scale(0.96); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

/* ── Header ── */
.cm-header {
    padding: 26px 30px 18px;
    border-bottom: 1px solid rgba(255,215,0,0.1);
    position: relative;
}
.cm-header-deco {
    position: absolute;
    top:0; left:0; right:0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    opacity: 0.5;
}
.cm-titulo {
    font-family: "MedievalSharp", cursive;
    color: #ffd700;
    font-size: 1.45em;
    margin: 0 0 3px;
}
.cm-subtitulo {
    font-family: Georgia, serif;
    color: #6a5a3a;
    font-size: 0.83em;
    margin: 0;
    font-style: italic;
}
.cm-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    color: rgba(255,215,0,0.4);
    font-size: 1.4em;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}
.cm-close:hover { color: #ffd700; }

/* ── Body ── */
.cm-body { padding: 22px 30px 28px; }

/* ── Botones de opción (opciones principales) ── */
.cm-opciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cm-opcion-btn {
    background: rgba(255,215,0,0.06);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 8px;
    color: #e0d0a8;
    font-family: "MedievalSharp", cursive;
    font-size: 1em;
    padding: 15px 18px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 14px;
}
.cm-opcion-btn:hover {
    background: rgba(255,215,0,0.13);
    border-color: rgba(255,215,0,0.45);
    transform: translateX(4px);
}
.cm-opcion-btn.secundario {
    border-color: rgba(255,255,255,0.08);
    color: #6a5a3a;
    font-size: 0.88em;
}
.cm-opcion-btn.secundario:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.15);
    color: #a89060;
    transform: none;
}
.cm-opcion-icono { font-size: 1.2em; flex-shrink: 0; }
.cm-opcion-desc {
    font-family: Georgia, serif;
    font-size: 0.74em;
    color: #6a5a3a;
    display: block;
    margin-top: 2px;
}

/* ── Separador de sección ── */
.cm-section {
    font-family: "MedievalSharp", cursive;
    color: #ffd700;
    font-size: 0.72em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 16px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}
.cm-section:first-child { margin-top: 0; }
.cm-section::before, .cm-section::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,215,0,0.15);
}

/* ── Campos ── */
.cm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 11px;
}
.cm-label {
    font-family: Georgia, serif;
    color: #8a7850;
    font-size: 0.79em;
}
.cm-label span { color: #c0392b; margin-left: 2px; }

.cm-input, .cm-select {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,215,0,0.18);
    border-radius: 6px;
    color: #e0d0a8;
    font-family: Georgia, serif;
    font-size: 0.9em;
    padding: 9px 12px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cm-input::placeholder { color: rgba(168,144,96,0.4); }
.cm-input:focus, .cm-select:focus {
    border-color: rgba(255,215,0,0.5);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.06);
}
.cm-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a89060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.cm-select option { background: #1a1208; color: #e0d0a8; }
.cm-select:disabled { opacity: 0.45; cursor: not-allowed; }

.cm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ── Pie del formulario ── */
.cm-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    gap: 10px;
}
.cm-btn-volver {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #6a5a3a;
    font-family: Georgia, serif;
    font-size: 0.84em;
    padding: 8px 16px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.cm-btn-volver:hover { color: #a89060; border-color: rgba(255,255,255,0.2); }

.cm-btn-submit {
    background: rgba(255,215,0,0.1);
    border: 1px solid rgba(255,215,0,0.45);
    border-radius: 6px;
    color: #ffd700;
    font-family: "MedievalSharp", cursive;
    font-size: 0.93em;
    padding: 9px 24px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.cm-btn-submit:hover {
    background: rgba(255,215,0,0.2);
    box-shadow: 0 0 14px rgba(255,215,0,0.15);
}

/* ── Error ── */
.cm-error {
    font-family: Georgia, serif;
    font-size: 0.81em;
    color: #c0392b;
    margin: 8px 0 0;
    display: none;
}

/* ── Éxito ── */
.cm-exito {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 48px 30px;
    text-align: center;
    gap: 12px;
}
.cm-exito.visible { display: flex; }
.cm-exito-icono {
    font-size: 2.6em;
    animation: popIn 0.45s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.cm-exito h3 {
    font-family: "MedievalSharp", cursive;
    color: #ffd700;
    font-size: 1.25em;
    margin: 0;
}
.cm-exito p {
    font-family: Georgia, serif;
    color: #a89060;
    font-size: 0.86em;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 500px) {
    .cm-body { padding: 18px 18px 24px; }
    .cm-header { padding: 20px 18px 14px; }
    .cm-row { grid-template-columns: 1fr; }
}
