/* Estilos para el formulario de opinión con diseño de ticket */

.formulario-ticket-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.formulario-ticket {
    background: #fff;
    color: #333;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* Simulación de perforación para el ticket */
.formulario-ticket::before,
.formulario-ticket::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--bg-color, #f4f4f4); /* Color del fondo de la página */
    border-radius: 50%;
    z-index: 2;
}

.formulario-ticket::before {
    left: -20px;
}

.formulario-ticket::after {
    right: -20px;
}

.ticket-page-header {
    text-align: center;
    margin-bottom: 30px;
}

.ticket-page-header h2 {
    font-family: var(--font-heading);
    color: var(--section-title-color, #222);
    margin: 0 0 10px 0;
    font-size: 2em;
}

.ticket-page-header p {
    margin: 0 auto;
    color: #666;
    font-size: 1.1em;
    max-width: 600px;
}

.formulario-ticket {
    padding-top: 20px; /* Añadir un poco de espacio arriba ya que no hay header */
}

.ticket-body {
    display: flex;
    padding: 30px;
}

.ticket-left,
.ticket-right {
    width: 50%;
    padding: 0 20px;
}

.ticket-left {
    border-right: 2px dashed #ccc;
}

.ticket-right {
    padding-left: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-family: var(--font-body);
    font-size: 0.9em;
    color: #555;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(228, 84, 88, 0.2);
}

.form-group .error-input {
    border-color: #e74c3c;
    background-color: #fbecec;
}
.form-group .error-input:focus {
     box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}
.error-message {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
}

.ticket-footer {
    padding: 20px 30px;
    background-color: #f7f7f7;
    text-align: center;
    border-top: 1px solid #eee;
}

.btn-enviar-opinion {
    width: auto;
    padding: 12px 30px;
    font-size: 1.1em;
    font-family: var(--font-heading);
    background-color: var(--button-bg);
    color: var(--button-text) !important;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-enviar-opinion:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Estilos para el input de archivo personalizado */
.inputfile {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.inputfile + label.btn-file {
    font-size: 0.9em;
    font-weight: 700;
    color: white;
    background-color: #5a6268;
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: var(--font-body);
}

.inputfile:focus + label.btn-file,
.inputfile + label.btn-file:hover {
    background-color: #333;
}

.inputfile + label.btn-file span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 150px;
    vertical-align: middle;
}

/* Mensajes de feedback */
.form-feedback.error {
    background-color: #fbecec;
    color: #e74c3c;
    padding: 15px;
    border-radius: 5px;
    margin: 0 30px 20px 30px;
    border: 1px solid #e74c3c;
}
.form-feedback.error ul {
    margin: 0;
    padding-left: 20px;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .formulario-ticket-container {
        flex-direction: column;
        align-items: stretch; /* Para que el formulario ocupe el ancho */
        padding: 20px 15px;
    }

    .ticket-page-header {
        margin-bottom: 25px;
    }

    .ticket-body {
        flex-direction: column;
        padding: 20px;
    }

    .ticket-left,
    .ticket-right {
        width: 100%;
        padding: 0;
    }

    .ticket-left {
        border-right: none;
        border-bottom: 2px dashed #ccc;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .ticket-right {
        padding-left: 0;
    }

    .formulario-ticket::before,
    .formulario-ticket::after {
        display: none; /* Ocultar los semicírculos en móvil */
    }
}

/* Estilos para previsualización de foto */
.file-upload-group {
    text-align: center;
    margin-top: 10px;
}
.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.foto-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-border, #eee);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #f0f0f0;
}
