/**
 * Modeo Account - Forms
 * 
 * Premium styles for all account forms (edit account, addresses, etc.)
 */

/* ========================================
   EDIT ACCOUNT CONTAINER
   ======================================== */

.modeo-edit-account {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.edit-account-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.edit-account-description {
    color: #6b7280;
    margin: 8px 0 0;
    font-size: 1rem;
}

/* ========================================
   FORM SECTIONS
   ======================================== */

.form-section {
    background: #ffffff;
    border: 1px solid rgba(204, 22, 22, 0.08);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.form-section:hover {
    border-color: rgba(204, 22, 22, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.form-section-title .material-icons {
    font-size: 28px;
    color: #cc1616;
}

.form-section-description {
    color: #6b7280;
    font-size: 0.9375rem;
    margin-bottom: 20px;
    font-style: italic;
}

/* ========================================
   FORM ROWS
   ======================================== */

.woocommerce-form-row {
    margin-bottom: 20px;
}

.form-row-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .form-row-grid {
        grid-template-columns: 1fr;
    }
}

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

.woocommerce-form-row label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.required {
    color: #cc1616;
    font-weight: 700;
}

.form-help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ========================================
   FORM INPUTS
   ======================================== */

.woocommerce-Input,
.input-text,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
}

.woocommerce-Input:focus,
.input-text:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #cc1616;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1);
}

.woocommerce-Input:disabled,
.input-text:disabled,
.woocommerce-Input[readonly],
.input-text[readonly] {
    background: #f9fafb;
    cursor: not-allowed;
    opacity: 0.8;
    color: #6b7280;
    border-color: #e5e7eb;
}

/* ========================================
   PASSWORD INPUT WITH TOGGLE
   ======================================== */

.password-input-wrapper {
    position: relative;
    display: block;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #cc1616;
}

.password-toggle .material-icons {
    font-size: 20px;
}

/* ========================================
   PASSWORD STRENGTH INDICATOR
   ======================================== */

.password-strength-indicator {
    margin-top: 8px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.password-strength-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #ef4444;
    transition: all 0.3s ease;
}

.password-strength-indicator.weak::before {
    width: 33%;
    background: #ef4444;
}

.password-strength-indicator.medium::before {
    width: 66%;
    background: #f59e0b;
}

.password-strength-indicator.strong::before {
    width: 100%;
    background: #10b981;
}

/* ========================================
   FORM ACTIONS
   ======================================== */

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.form-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 999px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.form-actions .btn-primary {
    background: #cc1616;
    color: #ffffff;
}

.form-actions .btn-primary:hover {
    background: #b31313;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.25);
}

.form-actions .btn-secondary {
    background: #ffffff;
    color: #cc1616;
    border: 2px solid #cc1616;
}

.form-actions .btn-secondary:hover {
    background: #cc1616;
    color: #ffffff;
}

.form-actions .material-icons {
    font-size: 20px;
}

/* ========================================
   VALIDATION STATES
   ======================================== */

.woocommerce-invalid input,
.woocommerce-invalid select,
.woocommerce-invalid textarea {
    border-color: #ef4444;
}

.woocommerce-validated input,
.woocommerce-validated select,
.woocommerce-validated textarea {
    border-color: #10b981;
}

.woocommerce-error,
.woocommerce-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.woocommerce-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.woocommerce-message {
    background: #d1fae5;
    color: #047857;
    border-left: 4px solid #10b981;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .form-section {
        padding: 20px;
    }

    .form-section-title {
        font-size: 1.125rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   MODERN FORM FIELDS (Edit Account)
   ======================================== */

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

.form-label {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 0.9375rem;
}

.form-label .required {
    color: #cc1616;
}

/* Input Wrapper with Icon */
.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-input-wrapper .form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-input-wrapper .form-input:focus {
    outline: none;
    border-color: #cc1616;
    box-shadow: 0 0 0 3px rgba(204, 22, 22, 0.1);
}

.form-input-wrapper .form-input:focus+.input-icon,
.form-input-wrapper:focus-within .input-icon {
    color: #cc1616;
}

.form-input-wrapper.password-wrapper .form-input {
    padding-right: 90px;
}

/* Input Badge */
.input-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.readonly-badge {
    background: #f3f4f6;
    color: #6b7280;
}

.readonly-badge .material-icons {
    font-size: 14px;
}

/* Form Info Box */
.form-section-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(204, 22, 22, 0.04) 0%, rgba(248, 113, 113, 0.02) 100%);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(204, 22, 22, 0.08);
}

.form-section-info .material-icons {
    color: #cc1616;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-section-info p {
    color: #6b7280;
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Help Text */
.form-help-text {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.form-help-text .material-icons {
    font-size: 16px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Section Heading with Icon */
.edit-account-header .section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edit-account-header .section-heading .material-icons {
    color: #cc1616;
    font-size: 28px;
}