@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* VERSION 12 */

:root {
    --accent-color: #E53935; /* Tono rojo/coral de la imagen */
    --text-color-dark: #333;
    --text-color-light: #555;
    --border-color: #e0e0e0;
    --background-light: #f7f7f7;
}

body {
    margin: 0;
    padding: 0;
    color: var(--text-color-dark);
    background-color: #f5f5f5;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    font-size: 1em;

}
.container {
    display: flex;
    min-height: 100vh;
    align-items: flex-start; 
    padding: 24px;
    gap: 24px;
    box-sizing: border-box;
}
.controls {
    flex: 1;
    padding: 40px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    max-width: 420px;
    z-index: 20;
}

.preview {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
    overflow: hidden;
    position: sticky; /* Mantenemos el panel derecho fijo al hacer scroll en el izquierdo */
    top: 24px; /* Ajustado al padding del contenedor */
    height: calc(100vh - 48px); /* Ajustado al padding del contenedor */
    z-index: 10;
    border-radius: 12px; /* Para coherencia visual */
}

.preview-wrapper {
    width: 100%;
    height: 100%;
    padding: 40px; /* AÑADIMOS EL PADDING AQUÍ */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Clave para que los hijos con position:absolute se orienten bien */
        box-sizing: border-box; /* <-- AÑADE ESTA LÍNEA */

}
.frame-preview {
    position: relative;
    transition: all 0.3s;
}
.wall {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.frame {
    position: relative;
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.155);
    transition: all 0.2s;
}
.frame-inner-shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 2px 7px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 2;
}


/* === ESTILOS PARA EL MODO SIN MARCO === */

/* Usamos un selector padre para anular los estilos de los hijos */
.frame-preview.frameless-mode .frame {
    /* Eliminamos el borde que se añade desde JS */
    border: none !important; 
    /* Mantenemos la sombra exterior para dar efecto de flotación,
       si no la quieres, puedes cambiarla a "box-shadow: none;" */
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.155); 
}

/* Ocultamos la sombra interior del marco */
.frame-preview.frameless-mode .frame-inner-shadow {
    display: none;
}

/* Eliminamos la sombra interior de la propia obra */
.frame-preview.frameless-mode .artwork {
    box-shadow: none;
}


.mat {
    position: relative;
    transition: all 0.3s;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.mat::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 35%,
        rgba(255, 255, 255, 0.4) 49%,
        rgba(255, 255, 255, 0.4) 53%,
        transparent 59%
    );
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.3s;
}

.mat.no-glass-reflection::after {
    opacity: 0;
}

.mat.semi-glass-reflection::after {
    opacity: 0.7;
}
/* ▲▲▲ FIN ▲▲▲ */

.artwork {
    container-type: inline-size;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    box-shadow:
        inset 0px 1px 1px 1px rgba(0, 0, 0, 0.05),
        inset 1px 0px 1px 1px rgba(0, 0, 0, 0.05);
}

.artwork img {
    /* Reemplazamos max-width y max-height para permitir la ampliación */
    width: 100.2%;
    height: 100.2%;
    object-fit: contain;
}
.artwork-placeholder {
    /* --- Contenedor Principal --- */
    background: linear-gradient(222deg, #ff4b4b, #a371f9); 
    padding: 30px; /* Aumentamos un poco el padding para que respire mejor */
    width: 100%;
    height: 100%;

    /* Centramos el bloque de texto vertical y horizontalmente */
    display: flex;
    justify-content: center;
    align-items: center;
}

.placeholder-text {
    /* --- Estilo del Párrafo --- */
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.2;
    text-align: left; /* Mantenemos la alineación izquierda de tu última petición */
font-size: clamp(16px, 13cqw, 70px);
    /* El tamaño de fuente es ahora uniforme y se adapta al contenedor */
}

/* --- Estilos para las palabras individuales (solo color) --- */
.placeholder-text .text-primary {
    color: rgb(252, 250, 244); /* La palabra destacada */
    font-size: clamp(16px, 18cqw, 79px);
}

.placeholder-text .text-secondary {
    color: #ffbae0; /* El resto del texto */
}
.artwork-size-display {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
    width: 135px;
    text-align: center;
}

h1 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-color-dark);
    font-weight: 700;
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;

}
h2 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight:700;
    font-size: 1.1em;
    color: var(--text-color-dark);
    border-bottom: none;
    padding-bottom: 8px;
    border-top: 2px solid #ffbfbf;
    padding-top: 16px;
    font-family: 'Montserrat', Helvetica, Arial, sans-serif;

}
label, .toggle-text {
    display: block;
    margin: 14px 0 8px;
    font-weight: 500;
    font-size: 16px;
    color: var(--text-color-light);
}
select, input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}



/* === ESTILOS PERSONALIZADOS PARA SLIDERS === */

/* 1. Estilos generales y reseteo */
input[type="range"] {
  -webkit-appearance: none; /* Elimina el estilo por defecto en WebKit */
  appearance: none;
  width: 100%; /* Asegura que ocupe todo el ancho */
  height: 8px; /* Altura de la barra */
  background: #e0e0e0; /* Color de fondo de la barra */
  border-radius: 5px;
  outline: none; /* Sin borde al hacer foco */
  padding: 0; /* Eliminar padding interno */
  margin: 10px 0;
}

/* 2. Estilo del control (thumb) para Chrome, Safari, Edge */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; /* Ancho del control */
  height: 20px; /* Alto del control */
  background: var(--accent-color); /* Usa tu color de acento */
  border-radius: 50%; /* Lo hace circular */
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  cursor: pointer;
  margin-top: 0px; /* Ajuste vertical para centrarlo sobre la barra */
}

/* 3. Estilo del control (thumb) para Firefox */
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  cursor: pointer;
}

/* 4. Estilo de la barra (track) para Firefox */
input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
}

/* Nuevo contenedor principal para las dos columnas */
.dimension-controls {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centra el candado verticalmente con las columnas */
    gap: 14px; /* Espacio entre columnas y candado */
    margin-top: 14px;
    margin-bottom: 10px;
}

/* Estilo para cada columna individual (Ancho y Alto) */
.dimension-group {
    flex: 1; /* Hace que ambas columnas ocupen el mismo espacio */
    display: flex;
    flex-direction: column;
}

/* Ajustes menores a los elementos que ya teníamos */
.dimension-group .input-group {
    width: 100%;
}

#aspect-ratio-lock-container {
    padding-bottom: 0; /* Eliminamos el padding que ya no es necesario */
}

#aspect-ratio-lock-icon {
    font-size: 18px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.2s ease-in-out;
    padding: 4px;
    border-radius: 5px;
    user-select: none; /* Evita que el texto del icono se seleccione */
}

#aspect-ratio-lock-icon:hover {
    opacity: 1;
    background-color: #f0f0f0;
}

#aspect-ratio-lock-icon.unlocked {
    opacity: 0.25;
}

/* Estilos para los nuevos botones +/- */
.stepper-btn {
    background-color: transparent;
    border: none;
    color: var(--text-color-light);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 8px;
    transition: background-color 0.2s;
}

.stepper-btn:hover {
    background-color: #f0f0f0;
}



/* Estilos para el nuevo grupo de input numérico */
.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 8px;
}

.input-group label {
    margin: 0; /* Anulamos el margen que tenía antes */
    font-weight: 500;
    font-size: 16px;
    color: var(--text-color-light);
}

.input-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding-right: 8px;
    background-color: white;
}

.input-field input[type="number"] {
    width: 40px; /* Hacemos un poco más de espacio */
    padding: 8px 0; /* Ajustamos el padding vertical */
    border: none;
    background-color: transparent;
    margin-bottom: 0; /* Anulamos el margen que tenía antes */
    text-align: right;
    font-size: 14px;
}

/* Opcional: Ocultar las flechas por defecto del input numérico para un look más limpio */
.input-field input[type="number"]::-webkit-outer-spin-button,
.input-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.input-field span {
    font-size: 14px;
    color: #888;
}

#customer-notes{    
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}
/* ▼▼▼ ESTILOS NUEVOS PARA FICHAS ▼▼▼ */
.card-option-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.card-option {
    flex: 1 1 auto; /* Permite que las tarjetas crezcan y se ajusten */
    padding: 10px 7px;
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.card-option:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.card-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9f9f9;
    color: #aaa;
    border-color: var(--border-color);
}

.card-option.disabled:hover {
    /* Anula el efecto hover para las opciones deshabilitadas */
    transform: none;
    border-color: var(--border-color);
    color: #aaa;
}

.card-option.selected {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.info-tooltip-container {
    position: relative;
    display: inline-block;
   /* margin-left: 8px;*/
    cursor: help;
}
.info-icon {
    vertical-align: middle;
    color: var(--accent-color);
}
.tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 260px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 13px;
    line-height: 1.5;
    z-index: 9999;
    position: absolute;
    bottom: 180%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0px 2px 8px rgba(0,0,0,0.25);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.info-tooltip-container.tooltip-below .tooltip-text {
    bottom: auto; /* Anulamos la posición por defecto */
    top: 140%;    /* Lo posicionamos ABAJO del icono */
    left: 80%;

}

.info-tooltip-container.tooltip-below .tooltip-text::after {
    top: auto;          /* Anulamos la posición de la flecha */
    bottom: 100%;       /* La ponemos ARRIBA del tooltip */
    border-color: transparent transparent #333 transparent; /* Hacemos que apunte HACIA ARRIBA */
    left: 3%;
}



.info-tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}
.tooltip-text p { margin: 4px 0; font-weight: normal; }
.tooltip-text p:first-child { margin-top: 0; }
.tooltip-text p:last-child { margin-bottom: 0; }
.tooltip-text hr { border: none; border-top: 1px solid #555; margin: 8px 0; }
.tooltip-text em { font-style: italic; opacity: 0.9; }

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-top: 8px;
    margin-right: 10px;
}
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--accent-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.toggle-label {
    display: flex;
    justify-content:flex-start;
    align-items: center;
    margin-bottom: 0px;

}
.toggle-text { font-size: 14px; }

.preview .wall-colors {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 100;
}

/* Título para el selector de color de pared */
.wall-colors-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 5px;
}

/* Pequeño ajuste al contenedor para alinear el título */
.preview .wall-colors {
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}
.color-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}
.color-option:hover {
    transform: scale(1.1);
}
.color-option.selected {
    border-color: var(--text-color-dark);
}

.custom-color-picker {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    border: 1.5px dashed #b3b3b3;
}
.custom-color-picker svg {
    color: #555;
    pointer-events: none;
}
.custom-color-picker input[type="color"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
}

select option[disabled] { color: #aaaaaa; background-color: #f0f0f0; }
#mat-color option[disabled] { color: #999999; }

.button {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s;
}
.button:hover {
    background-color: var(--accent-color);
    color: white;
}


.agreement-check {
  display: flex;
  align-items: flex-start;
  margin: 30px 0 15px 0;
}

.agreement-check input[type="checkbox"] {
  /* Hacemos el checkbox un poco más grande y lo alineamos */
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0; /* Evita que se encoja */
}

.agreement-check label {
  margin-left: 10px;
  font-size: 13px;
  color: var(--text-color-light);
  line-height: 1.5;
  cursor: pointer;
  margin-top: 0px;
}

button.button:disabled {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  color: #9e9e9e;
  cursor: not-allowed;
}

button.button:disabled:hover {
    background-color: #e0e0e0;
    color: #9e9e9e;
}

#frame-options-container,
#mat-options  {
    /* Oculta lo que se desborde */
    overflow: hidden;
    
    /* Estado inicial: completamente colapsado */
    max-height: 0;
    
    /* La animación que se aplicará cuando cambie max-height */
    transition: max-height 0.4s ease-out;
}

/* Una clase que añadiremos con JS para "abrir" el contenedor */
#frame-options-container.is-open, #mat-options.is-open  {
    /* Un valor de altura máxima más grande que el contenido que tendrá */
    max-height: 500px; 
}
.frame-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 15px;
}
.frame-type-option {
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    width: calc(20% - 8px);
    text-align: center;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.frame-type-option:hover {
    border-color: #999;
    transform: translateY(-2px);
}
.frame-type-option.selected {
    border-color: var(--text-color-dark);
}
.frame-color-preview {
    width: 100%;
    height: 20px;
    border-radius: 2px;
    margin-bottom: 5px;
    box-sizing: border-box;
}
.frame-type-option[data-value="white"] .frame-color-preview {
    border: 1px solid #ddd;
}
.final-dimensions    {
    margin-top: 20px;
    background-color: var(--background-light);
    padding: 12px 12px 12px 8px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid var(--accent-color);
}
.final-dimensions h3{margin-top: 5px;}


#aspect-ratio-lock-icon {
    font-size: 24px;
    opacity: 0.6;
    transition: all 0.2s;
}
#aspect-ratio-lock-icon:hover {
    opacity: 1;
}
#aspect-ratio-lock-icon.unlocked {
    /* Aquí podrías cambiar el icono a 🔓 si lo prefieres desde JS */
    opacity: 0.3; 
}

/* Estilo para el texto de advertencia en los controles */
.warning-text {
    color: #c0392b; /* Un tono de rojo para advertencias */
    font-size: 13px;
    background-color: #fbeeec;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    margin-top: 0px;
    margin-bottom: 15px;
    border: 1px solid #e5a099;
}

/* Estilo que se aplicará a la imagen cuando se esté recortando */
.artwork.is-cropping .artwork-preview-image {
    outline: 2px dashed #c0392b;
    outline-offset: -2px; /* Dibuja el borde por dentro */
}

.back-button {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 100;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease-in-out;
}

.back-button:hover {
    background-color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}



/* === ESTILOS PARA CARGA DE IMAGEN === */

.image-buttons-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button-like-upload {
    flex: 1; 
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin:0px;
    background-color: #f0f0f0;
    color: var(--text-color-light);
    transition: background-color 0.2s;

    /* --- Unificación --- */
    padding: 10px;         /* Misma altura de padding */
    font-size: 14px;       /* Mismo tamaño de fuente */
    font-weight: 500;      /* Mismo grosor de fuente */
    box-sizing: border-box;/* Cálculo de caja consistente */
}

.button-like-upload:hover {
    background-color: #e0e0e0;
}

.remove-button {
    flex: 1;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    cursor: pointer;
    background-color: transparent;
    color: var(--accent-color);
    transition: all 0.2s;

    /* --- Unificación --- */
    padding: 10px;         /* Misma altura de padding */
    font-size: 14px;       /* Mismo tamaño de fuente */
    font-weight: 500;      /* Mismo grosor de fuente */
    box-sizing: border-box;/* Cálculo de caja consistente */
}

.remove-button:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Estilos para la imagen previsualizada */
#artwork-preview-image {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Clave para centrar la imagen expandida */
    
    /* La solución universal: expandimos ambas dimensiones */
    width: 101%;
    height: 101%;

    /* Mantenemos object-fit para que la imagen no se deforme */
    object-fit: contain;
}

/* === ESTILOS PARA EL PANEL DE DATOS FLOTANTE === */
.floating-dimensions-panel {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-dimensions-panel h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-dimensions-panel p {
    margin: 0;
}
/* Mejora de contraste para el icono de info en el panel flotante */
.floating-dimensions-panel .info-icon {
    color: #ffffff;
    opacity: 0.8;
    margin-left: 5px;      /* Añade un pequeño espacio */
}

/* --- Estilos para el Modal de Resumen --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: white;
    padding: 25px 30px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #333;
}

.modal-body p {
    margin-top: 0;
    color: var(--text-color-light);
}

.modal-body textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    resize: none;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* --- Añade esta regla para solucionar el ancho de los botones del modal --- */
.modal-actions .button {
    width: auto; /* Anula el width: 100% heredado */
}
.button.button-primary {
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    text-decoration: none;
}
.button.button-primary:hover {
    background-color: #c4322f;
}

.button.button-secondary {
    background-color: #f0f0f0;
    color: #555;
    border-color: #f0f0f0;
}
.button.button-secondary:hover {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
}