/* Estilos generales para el formulario */
#custom-form-container {
    max-width: 500px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.user-info {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.user-info p {
    margin: 5px 0;
    font-size: 14px;
}

#custom-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Estilos para campos y etiquetas */
#custom-form label {
    font-weight: bold;
    margin-bottom: 5px;
}

#custom-form input[type="text"],
#custom-form canvas {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Estilos para mensajes de error */
.error-message {
    color: #d9534f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* Estilos para botones */
#scan-barcode,
#clear-signature,
#custom-form button[type="submit"],
#custom-form-result-accept {
    padding: 12px 18px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

#scan-barcode:hover,
#clear-signature:hover,
#custom-form button[type="submit"]:hover,
#custom-form-result-accept:hover {
    background-color: #005f8d;
}

/* Contenedor de firma */
#signature-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#signature-pad {
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    height: 200px;
    background-color: white;
}

/* Contenedor de la c¨¢mara - Mejorado para m¨®viles */
#barcode-scanner-container {
    width: 100%;
    height: 60vh;
    max-height: 500px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

#barcode-scanner-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media Queries para m¨®viles */
@media (max-width: 600px) {
    #custom-form {
        width: 100%;
        padding: 10px;
    }

    #signature-pad {
        height: 180px;
    }

    #scan-barcode,
    #clear-signature,
    #custom-form button[type="submit"],
    #custom-form-result-accept {
        padding: 14px 20px;
        font-size: 18px;
    }
}

/* Estilos para el mensaje de resultado */
#custom-form-result {
    display: none;
    text-align: center;
    margin-top: 50px;
}

#custom-form-result-message {
    font-size: 18px;
    font-weight: bold;
    color: black;
    margin-bottom: 20px;
}