/**
 * RTO Grow Enrolment Form Styles
 * @package RTOGrow
 * @since 2.1.0
 */

/* Modal */
.rto-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.rto-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.rto-modal-container {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.rto-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.rto-modal-close:hover {
    background: #e5e7eb;
}

/* Header */
.rto-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.rto-modal-header h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
}

.rto-course-summary {
    background: #f9fafb;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

/* Steps */
.rto-steps {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.rto-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.rto-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
}

.rto-step.active:not(:last-child)::after,
.rto-step.completed:not(:last-child)::after {
    background: #7c3aed;
}

.rto-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.rto-step.active .rto-step-num,
.rto-step.completed .rto-step-num {
    background: #7c3aed;
    color: #fff;
}

.rto-step-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.rto-step.active .rto-step-label {
    color: #7c3aed;
    font-weight: 600;
}

/* Form Steps */
.rto-form-step {
    display: none;
    padding: 24px;
}

.rto-form-step.active {
    display: block;
}

.rto-form-step h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.rto-step-desc {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
}

/* Form Fields */
.rto-form-group {
    margin-bottom: 16px;
}

.rto-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.rto-form-group input[type="text"],
.rto-form-group input[type="email"],
.rto-form-group input[type="tel"],
.rto-form-group input[type="date"],
.rto-form-group input[type="password"],
.rto-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.rto-form-group input:focus,
.rto-form-group select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

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

.rto-field-help {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.rto-field-help a {
    color: #7c3aed;
}

/* Form Layout */
.rto-form-row {
    display: flex;
    gap: 16px;
}

.rto-half { flex: 1; min-width: 150px; }
.rto-third { flex: 1; min-width: 100px; }
.rto-quarter { flex: 0 0 25%; min-width: 80px; }

/* Checkboxes & Radios */
.rto-checkbox,
.rto-radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    margin-bottom: 8px;
}

.rto-checkbox input,
.rto-radio-group input {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.rto-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

/* Info Message */
.rto-info-msg {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px 14px;
    color: #1e40af;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Buttons */
.rto-form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.rto-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.rto-btn-primary {
    background: #7c3aed;
    color: #fff;
}

.rto-btn-primary:hover {
    background: #6d28d9;
}

.rto-btn-primary:disabled {
    background: #a78bfa;
    cursor: not-allowed;
}

.rto-btn-secondary {
    background: #f3f4f6;
    color: #333;
}

.rto-btn-secondary:hover {
    background: #e5e7eb;
}

.rto-btn-link {
    background: none;
    border: none;
    color: #7c3aed;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-top: 8px;
}

/* Review Section */
.rto-review-section {
    margin-bottom: 20px;
}

.rto-review-section h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.rto-review-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    font-size: 14px;
}

.rto-review-box p {
    margin: 0 0 6px;
}

.rto-review-box p:last-child {
    margin-bottom: 0;
}

/* Price */
.rto-price-box {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.rto-price {
    font-size: 32px;
    font-weight: 700;
}

/* Agreements */
.rto-agreements {
    margin-bottom: 20px;
}

.rto-agreements .rto-checkbox {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
}

/* Success */
.rto-success-step {
    text-align: center;
    padding: 40px 24px;
}

.rto-success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.rto-success-step h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.rto-success-step > p {
    color: #666;
    margin-bottom: 20px;
}

/* Mobile */
@media (max-width: 600px) {
    .rto-modal { padding: 0; }
    .rto-modal-container { border-radius: 0; max-height: 100vh; height: 100%; }
    .rto-step-label { display: none; }
    .rto-form-step { padding: 16px; }
    .rto-form-row { flex-direction: column; gap: 0; }
    .rto-half, .rto-third, .rto-quarter { flex: 1 1 100%; }
    .rto-form-buttons { flex-direction: column-reverse; }
    .rto-btn { width: 100%; }
}
