/**
 * ==========================================================================
 * FORM.CSS - SICOP
 * ==========================================================================
 * Estilos para formularios generados por Yii Framework.
 * Soporta dos layouts:
 * - <div class="form">       : Labels y campos en líneas separadas
 * - <div class="wide form">  : Labels y campos en la misma línea
 * 
 * ESTRUCTURA ESPERADA:
 * <div class="form">
 *     <div class="row">
 *         <label for="inputid">Etiqueta</label>
 *         <input name="inputid" id="inputid" type="text">
 *         <p class="hint">Texto de ayuda</p>
 *     </div>
 *     <div class="row buttons">
 *         <input type="submit" value="Guardar">
 *     </div>
 * </div>
 * 
 * @author Yii Software LLC (modificado para SICOP)
 * ==========================================================================
 */

/* ==========================================================================
   CONTENEDOR DE FORMULARIO
   ========================================================================== */

div.form {
    /* Contenedor principal */
}

div.form input,
div.form textarea,
div.form select {
    margin: 0.2em 0 0.5em 0;
}

/* ==========================================================================
   FIELDSETS
   ========================================================================== */

div.form fieldset {
    border: 1px solid #DDD;
    padding: 10px;
    margin: 0 0 10px 0;
    border-radius: 7px;
}

/* ==========================================================================
   LABELS
   ========================================================================== */

div.form label {
    font-weight: bold;
    font-size: 0.9em;
    display: block;
}

/* ==========================================================================
   FILAS (ROWS)
   ========================================================================== */

div.form .row {
    margin: 5px 0;
}

/* ==========================================================================
   TEXTOS DE AYUDA
   ========================================================================== */

div.form .hint {
    margin: 0;
    padding: 0;
    color: #999;
}

div.form .note {
    font-style: italic;
}

/* ==========================================================================
   CAMPOS REQUERIDOS
   ========================================================================== */

div.form span.required {
    color: red;
}

/* ==========================================================================
   ESTADOS DE ERROR
   ========================================================================== */

div.form div.error label,
div.form label.error,
div.form span.error {
    color: #C00;
}

div.form div.error input,
div.form div.error textarea,
div.form div.error select,
div.form input.error,
div.form textarea.error,
div.form select.error {
    background: #FEE;
    border-color: #C00;
}

/* ==========================================================================
   ESTADOS DE ÉXITO
   ========================================================================== */

div.form div.success input,
div.form div.success textarea,
div.form div.success select,
div.form input.success,
div.form textarea.success,
div.form select.success {
    background: #E6EFC2;
    border-color: #C6D880;
}

/* ==========================================================================
   RESUMEN DE ERRORES
   ========================================================================== */

div.form .errorSummary {
    border: 2px solid #C00;
    padding: 7px 7px 12px 7px;
    margin: 0 0 20px 0;
    background: #FEE;
}

div.form .errorMessage {
    color: #C00;
    font-size: 0.9em;
}

/* ==========================================================================
   LAYOUT WIDE (Labels e inputs en misma línea)
   ========================================================================== */

div.wide.form label {
    float: left;
    margin-right: 10px;
    position: relative;
    text-align: right;
    width: 100px;
}

div.wide.form .row {
    clear: left;
}

div.wide.form .hint,
div.wide.form .errorMessage {
    margin: 0 0 0 110px;
    clear: left;
}

div.wide.form .buttons {
    padding-left: 110px;
}
