/**
 * Frontend Registration Form Styles
 * Styles for the student registration form on the frontend
 */

.ta-registration-form-wrap {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ta-form-title {
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid #2271b1;
    font-size: 24px;
    color: #1d2327;
    text-align: center;
}

/* ====== Form Fields ====== */
.ta-form-fields {
    display: flex;
    flex-direction: column;
    gap: var(--ta-form-field-gap, 20px);
}

.ta-form-group {
    display: flex;
    flex-direction: column;
}

.ta-form-group label {
    font-weight: 600;
    margin-bottom: var(--ta-form-label-gap, 8px);
    color: #3c434a;
    font-size: 14px;
}

.ta-custom-fields-wrap .tutor-form-group {
    margin-bottom: var(--ta-form-field-gap, 20px);
}

.ta-custom-fields-wrap .tutor-form-group:last-child {
    margin-bottom: 0;
}

.ta-custom-fields-wrap .tutor-form-group > label {
    margin-bottom: var(--ta-form-label-gap, 8px);
}

.ta-required {
    color: #d63638;
    margin-left: 3px;
}

/* ====== Input Fields ====== */
.ta-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ta-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.ta-input.ta-required-field {
    border-left: 3px solid #2271b1;
}

textarea.ta-input {
    resize: vertical;
    min-height: 100px;
}

/* ====== Select Dropdown ====== */
.ta-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233c434a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ====== Radio Group ====== */
.ta-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ta-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    transition: all 0.2s;
}

.ta-radio-label:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.ta-radio-label input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ta-radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #2271b1;
}

/* ====== Checkbox Group ====== */
.ta-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ta-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    transition: all 0.2s;
}

.ta-checkbox-label:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.ta-checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ta-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #2271b1;
}

/* ====== Form Footer ====== */
.ta-form-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ta-btn-submit {
    padding: 14px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ta-btn-submit:hover {
    background: #135e96;
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
}

.ta-btn-submit:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

#ta-form-message {
    font-size: 14px;
    flex: 1;
}

#ta-form-message .success {
    color: #00a32a;
    font-weight: 600;
}

#ta-form-message .error {
    color: #d63638;
    font-weight: 600;
}

/* ====== Success/Error Notices ====== */
.ta-notice {
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
    border-left: 4px solid;
}

.ta-notice-success {
    background: #edfaef;
    border-left-color: #00a32a;
    color: #00a32a;
}

.ta-notice-warning {
    background: #fcf9e8;
    border-left-color: #dba617;
    color: #dba617;
}

.ta-notice-error {
    background: #fcf0f1;
    border-left-color: #d63638;
    color: #d63638;
}

/* ====== Responsive Design ====== */
@media (max-width: 768px) {
    .ta-registration-form-wrap {
        margin: 20px;
        padding: 20px;
    }
    
    .ta-form-title {
        font-size: 20px;
    }
    
    .ta-form-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ta-btn-submit {
        width: 100%;
        text-align: center;
    }
}

/* ====== Loading State ====== */
.ta-btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.ta-btn-submit.loading:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ta-spin 0.8s linear infinite;
}

@keyframes ta-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====== Validation Styles ====== */
.ta-input.error {
    border-color: #d63638;
    background: #fcf0f1;
}

.ta-field-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}
