/* ═══════════════════════════════════════════════════════════════════
   RBWO FORM STYLES - CSS File
   Drop this into your CSS file or save as forms.css
   ═══════════════════════════════════════════════════════════════════ */

/* ========================================
   Form Container
   ======================================== */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   Form Groups (Field Wrapper)
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

/* ========================================
   Labels
   ======================================== */
.form-group label,
label {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ========================================
   Text Inputs (text, email, password, tel, url, number)
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    color: #333333;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus {
    outline: none;
    border-color: #356492;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="tel"]:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   Textarea
   ======================================== */
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    color: #333333;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: #356492;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

textarea:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   Select Dropdowns
   ======================================== */
select {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    color: #333333;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%228%22 viewBox=%220 0 12 8%22%3e%3cpath fill=%22%23333333%22 d=%22M6 8L0 0h12z%22/%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

select:focus {
    outline: none;
    border-color: #356492;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   Checkboxes
   ======================================== */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

input[type="checkbox"]:checked {
    background-color: #356492;
    border-color: #356492;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox Label Wrapper */
.checkbox-label,
label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 0;
}

/* ========================================
   Radio Buttons
   ======================================== */
input[type="radio"] {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 50%;
    background-color: white;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

input[type="radio"]:checked {
    border-color: #356492;
    background-color: #356492;
    box-shadow: inset 0 0 0 3px white;
}

input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Radio Label Wrapper */
.radio-label,
label.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #333333;
    margin-bottom: 0.5rem;
}

/* ========================================
   Buttons
   ======================================== */

/* Primary Button (Submit) */
.btn-submit,
button[type="submit"],
input[type="submit"] {
    width: 100%;
    background-color: #356492;
    color: white;
    border: 2px solid #356492;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-sizing: border-box;
}

.btn-submit:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background-color: #eb6d19;
    border-color: #eb6d19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-submit:active,
button[type="submit"]:active,
input[type="submit"]:active {
    transform: translateY(0);
}

.btn-submit:disabled,
button[type="submit"]:disabled,
input[type="submit"]:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary Button (Cancel) */
.btn-secondary,
button[type="button"].btn-secondary {
    background-color: white;
    color: #356492;
    border: 2px solid #356492;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
button[type="button"].btn-secondary:hover {
    background-color: #356492;
    color: white;
}

.btn-secondary:disabled,
button[type="button"].btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-group .btn-submit,
.btn-group .btn-secondary {
    width: auto;
    flex: 1;
}

/* ========================================
   File Upload
   ======================================== */
input[type="file"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Barlow', sans-serif;
    font-size: 1rem;
    color: #333333;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

input[type="file"]:focus {
    outline: none;
    border-color: #356492;
    box-shadow: 0 0 0 3px rgba(53, 100, 146, 0.1);
}

input[type="file"]::file-selector-button {
    background-color: #356492;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #eb6d19;
}

/* ========================================
   Form Validation States
   ======================================== */

/* Error State */
input.error,
select.error,
textarea.error {
    border-color: #dc3545;
}

input.error:focus,
select.error:focus,
textarea.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    color: #dc3545;
    font-family: 'Barlow', sans-serif;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success State */
input.success,
select.success,
textarea.success {
    border-color: #038205;
}

input.success:focus,
select.success:focus,
textarea.success:focus {
    border-color: #038205;
    box-shadow: 0 0 0 3px rgba(3, 130, 5, 0.1);
}

.confirmheader {
	font-size: 18px;
	padding-bottom: 12px;
	border-bottom: 2px solid #e0e0e0;
	background-color: #e0e0e0;
}

.success-message {
    color: #038205;
    font-family: 'Barlow', sans-serif;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ========================================
   Helper Text
   ======================================== */
.help-text {
    color: #666666;
    font-family: 'Barlow', sans-serif;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ========================================
   Required Field Indicator
   ======================================== */
.required,
label .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

/* ========================================
   Field with Icon (Optional Enhancement)
   ======================================== */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 2.5rem;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-size: 1.25rem;
    pointer-events: none;
}

/* ========================================
   Inline Form (Horizontal Layout)
   ======================================== */
.form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-inline button {
    margin-top: 0;
    width: auto;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 640px) {
    .form-container {
        padding: 1rem;
    }
    
    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-inline .form-group {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ========================================
   Color Variables Reference
   ======================================== */
/*
Navy:    #356492  (Primary - buttons, focus states)
Orange:  #eb6d19  (Hover states, accents)
Teal:    #037077  (Alternative accent)
Green:   #038205  (Success states)
Blue:    #0076d6  (Info states)
Magenta: #c42f90  (Alternative accent)
Border:  #e0e0e0  (Default borders)
Text:    #333333  (Primary text)
Error:   #dc3545  (Error states)
*/