/* --- ESTILOS GENERALES --- */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f9;
    color: #2c3e50;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- CONTENEDOR Y CABECERA --- */
.form-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), 0 3px 12px rgba(0, 0, 0, 0.12);
    max-width: 600px;
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 120px;
    height: auto;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 35px;
    font-size: 1.9rem;
    font-weight: 600;
}

/* Nota breve bajo el título */
.form-note {
    margin: -10px 0 20px;
    font-size: 0.95rem;
    color: #5f6e78;
}

/* --- GRUPOS DE FORMULARIO --- */
.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: #555;
}

/* --- CALIFICACI"N POR ESTRELLAS --- */
.star-rating {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 2.5rem;
}

.star {
    cursor: pointer;
    color: #e0e0e0; /* Color gris por defecto */
    transition: color  0.2s ease, transform 0.2s ease;
}

.star.hover,
.star.selected {
    color: #ffc107; /* Amarillo intenso */
    transform: scale(1.2);
}

/* --- CALIFICACI"N POR PUNTOS --- */
.dot-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    background-color: #e0e0e0; /* Color gris por defecto */
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.dot.selected-dot {
    border-color: #2c3e50;
    transform: scale(1.2);
}

/* --- OTROS CAMPOS DE FORMULARIO --- */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background-color: #fdfdfd;
    color: #2c3e50;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- SELECT: ajustes responsive --- */
/* Asegura que el control nunca exceda su contenedor */
select {
    max-width: 100%;
}

/* En móviles, permitir que las opciones hagan wrap en varias líneas
   para evitar que el desplegable se haga más ancho que la pantalla. */
@media (max-width: 480px) {
    #conferencista-favorito option {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        line-height: 1.3;
    }
}

/* --- Mobile Select (overlay) --- */
@media (max-width: 480px) {
    .ms-trigger {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #dcdcdc;
        border-radius: 8px;
        background: #fdfdfd;
        color: #2c3e50;
        text-align: left;
        font: inherit;
        white-space: normal; /* allow 2-line layout */
        line-height: 1.35;
    }

    .ms-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 10000;
        display: none;
    }

    .ms-panel {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        background: #fff;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        max-height: 70vh;
        overflow: auto;
        box-shadow: 0 -8px 28px rgba(0,0,0,.25);
        z-index: 10001;
        display: none;
    }

    .ms-header {
        padding: 12px 16px;
        font-weight: 600;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .ms-close {
        border: none;
        background: transparent;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        color: #333;
    }

    .ms-option {
        padding: 12px 16px;
        border: 0;
        border-bottom: 1px solid #f0f0f0;
        background: #fff;
        text-align: left;
        width: 100%;
        font: inherit;
        color: #2c3e50;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    /* 2-line visuals for time/title inside trigger */
    .ms-trigger .ms-time { display:block; font-weight:600; color:#2c3e50; }
    .ms-trigger .ms-title { display:block; color:#495057; margin-top:2px; line-height:1.35; }
}

/* --- BOT"N Y MENSAJE --- */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: #3498db;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

#confirmation-message {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #eafaf1;
    color: #229954;
    border: 1px solid #229954;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* --- DISE'O RESPONSIVO --- */
@media (max-width: 768px) {
    body { padding: 15px; }
    .form-container { padding: 25px; }
    h1 { font-size: 1.6rem; }
    .dot { width: 25px; height: 25px; }
    .star-rating { font-size: 2rem; }
}

.custom-select {
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  width: 100%;
  cursor: pointer;
}

.custom-select:focus {
  outline: none;
  border-color: #007bff;
}

/* --- Overlay de opciones (aplica en todas las vistas) --- */
.ms-trigger {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #fdfdfd;
  color: #2c3e50;
  text-align: left;
  font: inherit;
  white-space: normal;
  line-height: 1.35;
}

.ms-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  display: none;
}

.ms-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  max-height: 70vh;
  overflow: auto;
  box-shadow: 0 -8px 28px rgba(0,0,0,.25);
  z-index: 10001;
  display: none;
}

.ms-header {
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ms-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.ms-option {
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  text-align: left;
  width: 100%;
  font: inherit;
  color: #2c3e50;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ms-option:hover {
  background: #f7f9fc;
}

.ms-option .ms-time {
  display: block;
  font-weight: 600;
  color: #2c3e50;
}

.ms-option .ms-title {
  display: block;
  color: #495057;
  margin-top: 2px;
  line-height: 1.35;
}

/* Two-line visuals for trigger (global) */
.ms-trigger .ms-time { display:block; font-weight:600; color:#2c3e50; }
.ms-trigger .ms-title { display:block; color:#495057; margin-top:2px; line-height:1.35; }
