@font-face {
    font-family: 'Birds Of Paradise';
    src: url('fonts/BirdsOfParadise.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Blacksword';
    src: url('fonts/Blacksword.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Madame';
    src: url('fonts/Madame.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Monotype Corsiva';
    src: url('fonts/MonotypeCorsiva.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('fonts/Montserrat-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Vogue';
    src: url('fonts/Vogue.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Summer';
    src: url('fonts/Summer.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ================================================================== */
/* 1. ESTILOS GENERALES DEL CONTENEDOR DEL GRABADOR */
/* ================================================================== */

#controles-container {
    background-color: white;
    padding: 20px 0 0 0; /* Ajustamos padding para el acordeón */
    border-radius: 8px;
}

#texto-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 15px; /* Más espacio */
    height: 44px;
    line-height: 1.5;
    border: 1px solid #ccc;
}

#contador-caracteres {
    float: right;
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

#personalizador-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#imagen-anillo {
    width: 100%;
    height: auto;
}

#svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Evita que el SVG bloquee clics */
}

.texto-grabado-base {
    /* La fuente base se define en el JS, esto es solo un fallback */
    font-family: 'Montserrat', sans-serif;
}


/* ================================================================== */
/* 2. ESTILOS PARA EL ACORDEÓN DEL GRABADOR */
/* ================================================================== */

.acordeon-grabado-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    /* Quitamos border-bottom para una apariencia más limpia */
}

.acordeon-grabado-cabecera {
    font-size: 16px;
    font-weight: 600;
}

#grabado-titulo-preview, .titulo {
    font-weight: 400;
    color: #292928;
    margin-left: 10px;
    font-family: 'Lato', sans-serif;
}

.acordeon-grabado-contenido {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.acordeon-grabado.activo .acordeon-grabado-contenido {
    max-height: 1200px; /* Aumentado para asegurar que todo quepa */
    transition: max-height 0.5s ease-in;
}

.icono-desplegable {
    width: 10px;
    height: 10px;
    border-left: 2px solid #333;
    border-bottom: 2px solid #333;
    transform: rotate(-45deg);
    transition: transform 0.3s ease-in-out;
    margin-right: 10px;
}

.acordeon-grabado.activo .icono-desplegable {
    transform: rotate(135deg);
}


/* ================================================================== */
/* 3. ESTILOS MEJORADOS Y FINALES PARA BOTONES DE FUENTE */
/* ================================================================== */

#fuentes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Espacio uniforme entre botones */
    margin-top: 10px;
}

#fuentes-container button.font-btn {
    flex-basis: calc(33.333% - 6px);
    flex-grow: 0;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #cccccc;
    border-radius: 5px;
    padding: 0 5px; /* Reducimos padding vertical a 0 porque height lo controlará */
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 14px;
    margin: 0;
    
    /* --- LÍNEAS NUEVAS Y CLAVE --- */
    height: 50px;             /* 1. Fija una altura para TODOS los botones */
    display: flex;            /* 2. Convierte el interior del botón en un contenedor flex */
    align-items: center;      /* 3. Centra verticalmente el texto */
    justify-content: center;  /* 4. Centra horizontalmente el texto */
}

#fuentes-container button.font-btn:hover {
    background-color: #f5f5f5;
    border-color: #b0b0b0;
}

#fuentes-container button.font-btn.active {
    background-color: #333333 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
    font-weight: bold;
}

/* Aplicamos las fuentes reales a cada botón para previsualización */
#fuentes-container button[data-font-name="Birds Of Paradise"] { font-family: 'Birds Of Paradise', cursive; }
#fuentes-container button[data-font-name="Blacksword"] { font-family: 'Blacksword', sans-serif; }
#fuentes-container button[data-font-name="Madame"] { font-family: 'Madame', serif; font-size: 24px;}
#fuentes-container button[data-font-name="Monotype"] { font-family: 'Monotype Corsiva', cursive; font-size: 16px; }
#fuentes-container button[data-font-name="Montserrat"] { font-family: 'Montserrat', sans-serif; }
#fuentes-container button[data-font-name="Vogue"] { font-family: 'Vogue', sans-serif; }
#fuentes-container button[data-font-name="Summer"] { font-family: 'Summer', cursive; font-size: 34px;}

/* ================================================================== */
/* 4. ESTILOS PARA BOTONES DE SÍMBOLOS */
/* ================================================================== */

#simbolos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Selector más específico para el estado normal */
#simbolos-container button.symbol-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    background-color: #ffffff !important; /* Añadimos !important por si acaso */
    border: 1px solid #dcdcdc !important;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 16px;
    color: #555555 !important; /* Color del símbolo oscuro */

    display: flex;
    align-items: center;
    justify-content: center;
}

/* Selector más específico para el estado hover */
#simbolos-container button.symbol-btn:hover {
    background-color: #f5f5f5 !important;
    border-color: #b0b0b0 !important;
}