/**
 * Student Registration - Public Styles
 */

/* Add vendor prefixes for cross-browser consistency */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

/* CSS Variables */
:root {
    --sr-primary: #2563eb;
    --sr-primary-hover: #1d4ed8;
    --sr-secondary: #64748b;
    --sr-success: #10b981;
    --sr-error: #ef4444;
    --sr-warning: #f59e0b;
    --sr-bg: #f8fafc;
    --sr-white: #ffffff;
    --sr-border: #e2e8f0;
    --sr-text: #1e293b;
    --sr-text-light: #64748b;
    --sr-radius: 8px;
    --sr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sr-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Wrapper */
.sr-registration-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 1rem 2rem 2rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Match theme font-size: 16px rule but add font-weight: 600 */
.sr-registration-wrapper p,
.sr-registration-wrapper ul,
.sr-registration-wrapper ol,
.sr-registration-wrapper li,
.sr-registration-wrapper p a,
.sr-registration-wrapper table,
.sr-registration-wrapper td,
.sr-registration-wrapper th,
.sr-registration-wrapper div {
    font-size: 16px;
    font-weight: 600;
}

/* Hide site title on registration pages */
.sr-registration-wrapper~.entry-title,
.sr-registration-wrapper~.page-title,
.sr-registration-wrapper~h1.page-title,
.entry-title,
.page-title,
h1.page-title {
    display: none !important;
}

.sr-registration-wrapper+h1,
.sr-registration-wrapper~h1 {
    text-align: center !important;
    font-size: 1.5rem !important;
}

.sr-registration-wrapper>h1 {
    text-align: center;
    font-size: 1.5rem;
}

/* School Header */
.sr-school-header {
    text-align: center;
    margin-bottom: 30px;
}

.sr-school-header h1 {
    margin: 0 0 10px 0;
    font-size: 1.75rem;
    color: #333;
    text-align: center;
}

.sr-school-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 700;
}

.sr-email-verified-status {
    color: #059669;
    font-weight: 700;
    margin-top: -0.8rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.sr-meta-item strong {
    color: #333;
}

.sr-school-meta .sr-divider {
    margin: 0 0.5rem;
    color: var(--sr-border);
}

/* Form Styles */
.sr-form {
    background: var(--sr-white);
    border-radius: var(--sr-radius);
    box-shadow: var(--sr-shadow);
    padding: 2.5rem;
}

.sr-step h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sr-text);
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--sr-primary);
}

/* Form Groups */
.sr-form-group {
    margin-bottom: 2.5rem;
}

.sr-form-group label {
    display: block;
    font-weight: 500;
    color: var(--sr-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.sr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    .sr-form-row {
        grid-template-columns: 1fr;
    }
}

/* Inputs */
.sr-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    background: var(--sr-white);
    color: var(--sr-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sr-input:focus {
    outline: none;
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sr-input::placeholder {
    color: var(--sr-text-light);
}

.sr-input-otp {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: 600;
    max-width: 200px;
}

.sr-readonly-field {
    background-color: #f8fafc !important;
    cursor: not-allowed !important;
}

textarea.sr-input {
    resize: vertical;
    min-height: 100px;
    padding: 0.5rem 0.75rem;
}

select.sr-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Exams Grid */
.sr-exams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--sr-bg);
    border-radius: var(--sr-radius);
    border: 1px solid var(--sr-border);
}

@media (max-width: 640px) {
    .sr-exams-grid {
        grid-template-columns: 1fr;
    }
}

.sr-exam-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: var(--sr-white);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
}

.sr-exam-item:hover {
    border-color: var(--sr-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sr-exam-item input[type="radio"],
.sr-exam-item input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

.sr-exam-info {
    display: flex;
    flex-direction: column;
}

.sr-exam-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--sr-text);
}

.sr-exam-price {
    font-size: 1rem;
    color: #27ae60 !important;
    /* Force green color */
    font-weight: 700 !important;
    margin-top: 0.25rem;
    display: block !important;
}

/* Exam Plan Card New Design */
.sr-exam-selection-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--sr-text);
    grid-column: 1 / -1;
}

.sr-exam-plan-card {
    background: var(--sr-white);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.sr-exam-plan-card:hover {
    border-color: var(--sr-primary);
    box-shadow: var(--sr-shadow);
}

.sr-exam-plan-card.selected {
    border-color: #10b981;
    border-width: 2px;
    background: #ffffff; /* White background as requested */
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), var(--sr-shadow-lg);
}

.sr-required-star {
    color: var(--sr-error);
    margin-left: 2px;
    vertical-align: baseline;
    font-size: 0.9em;
    position: relative;
    top: -1px;
}

.sr-plan-code {
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold !important;
    text-align: left; /* Explicitly left aligned */
}

.sr-plan-fee {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.sr-plan-fee del {
    color: #000 !important;
    font-weight: 800 !important;
    font-size: 0.9rem;
    text-decoration: line-through;
    opacity: 0.8;
}

.sr-plan-fee ins {
    text-decoration: none;
    color: #000 !important; /* Black as requested */
    font-weight: 800 !important; /* Extra bold */
}

.sr-old-price {
    color: #000 !important;
    font-weight: 800 !important;
    font-size: 0.9rem;
    text-decoration: line-through;
    opacity: 0.8;
    margin-right: 4px;
}

.sr-new-price {
    text-decoration: none;
    color: #000 !important;
    font-weight: 800 !important;
}

.sr-discount-badge {
    background: transparent;
    color: #000 !important; /* Ensure it is black as requested */
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 5px;
    display: inline-block;
}

.sr-plan-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--sr-text);
    margin-bottom: 1.5rem;
    font-weight: 300 !important; /* Lighter font weight */
    flex-grow: 1;
}

.sr-plan-selector {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--sr-primary);
    margin-top: auto;
    padding: 0.5rem 0;
}

.sr-plan-selector input[type="radio"] {
    width: 1.25rem !important;
    height: 1.25rem !important;
    cursor: pointer;
    margin: 0 0.5rem 0 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    position: relative;
    top: 1px;
    /* Optical adjustment to center with text */
}

.sr-plan-selector span {
    line-height: 1;
    position: relative;
    top: -2px;
    /* Pull text up for optical alignment */
}

/* Radio Groups */
.sr-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sr-radio-group-vertical {
    flex-direction: column;
}

.sr-radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.sr-radio input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    accent-color: var(--sr-primary);
}

.sr-radio span {
    font-size: 0.95rem;
    color: var(--sr-text);
}

.sr-case-messages {
    margin: 20px 0;
}

#sr-password-match-msg {
    margin-top: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Help Text */
.sr-help-text {
    font-size: 0.85rem;
    color: var(--sr-text-light);
    margin-top: 0.25rem;
}

/* Fixed Fields (School Info) */
.sr-fixed-fields {
    background: var(--sr-bg);
    border-radius: var(--sr-radius);
    padding: 1rem;
    margin: 1.5rem 0;
}

.sr-fixed-field {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.sr-fixed-field:not(:last-child) {
    border-bottom: 1px solid var(--sr-border);
}

.sr-fixed-field .sr-label {
    color: var(--sr-text-light);
}

.sr-fixed-field .sr-value {
    font-weight: 500;
    color: var(--sr-text);
}

/* Verified Email Display */
.sr-verified-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--sr-success);
    border-radius: var(--sr-radius);
    margin-bottom: 1.5rem;
    color: #065f46;
}

.sr-check-icon {
    font-size: 1.25rem;
}

/* Buttons */
.sr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--sr-radius);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.sr-btn-primary {
    background: var(--sr-primary);
    color: var(--sr-white);
}

.sr-btn-primary:hover {
    background: var(--sr-primary-hover);
}

.sr-btn-secondary {
    background: var(--sr-white);
    color: var(--sr-text);
    border: 1px solid var(--sr-border);
}

.sr-btn-secondary:hover {
    background: var(--sr-bg);
}

.sr-btn-link {
    background: transparent;
    color: var(--sr-primary);
    padding: 0.5rem 1rem;
}

.sr-btn-link:hover {
    text-decoration: underline;
}

.sr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sr-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
}

/* OTP Section */
.sr-otp-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

/* Messages */
.sr-message {
    padding: 1rem;
    border-radius: var(--sr-radius);
    margin-top: 1rem;
}

.sr-message-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--sr-success);
    color: #065f46;
}

.sr-message-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--sr-error);
    color: #991b1b;
}

.sr-message-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--sr-primary);
    color: #1e40af;
}

/* Error States */
.sr-input.sr-error {
    border-color: var(--sr-error);
}

.sr-error-text {
    color: var(--sr-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Loading State */
.sr-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.sr-btn.sr-loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: sr-spin 0.6s linear infinite;
}

@keyframes sr-spin {
    to {
        transform: rotate(360deg);
    }
}

/* School Selector */
.sr-school-selector {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.sr-school-selector h2 {
    font-size: 1.5rem;
    color: var(--sr-text);
    margin-bottom: 0.5rem;
}

.sr-schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.sr-school-card {
    display: block;
    padding: 1.5rem;
    background: var(--sr-white);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius);
    text-decoration: none;
    transition: all 0.2s;
}

.sr-school-card:hover {
    border-color: var(--sr-primary);
    box-shadow: var(--sr-shadow);
    transform: translateY(-2px);
}

.sr-school-card h3 {
    color: var(--sr-text);
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}

.sr-school-card p {
    color: var(--sr-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.sr-curriculum {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--sr-bg);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--sr-secondary);
}

/* Success Page */
.sr-success-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.sr-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--sr-success);
    color: var(--sr-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.sr-success-page h1 {
    font-size: 1.75rem;
    color: var(--sr-text);
    margin: 0 0 1rem 0;
}

.sr-registration-number {
    font-size: 1.1rem;
    color: var(--sr-text-light);
    margin-bottom: 1.5rem;
}

.sr-registration-number strong {
    color: var(--sr-text);
    font-family: monospace;
}

.sr-next-steps {
    text-align: left;
    background: var(--sr-bg);
    border-radius: var(--sr-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.sr-next-steps h3 {
    font-size: 1rem;
    color: var(--sr-text);
    margin: 0 0 1rem 0;
}

.sr-next-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.sr-next-steps li {
    margin-bottom: 0.5rem;
    color: var(--sr-text-light);
}

.sr-success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Notices */
.sr-notice {
    padding: 1rem;
    background: var(--sr-bg);
    border-radius: var(--sr-radius);
    color: var(--sr-text-light);
}

.sr-notes-display {
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1e293b;
    line-height: 1.5;
    word-wrap: break-word;
    text-align: left;
    min-height: auto;
    user-select: text;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.sr-error {
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--sr-error);
    border-radius: var(--sr-radius);
    color: #991b1b;
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {

    .sr-registration-wrapper,
    .sr-form {
        padding: 1rem;
    }

    .sr-form-actions {
        flex-direction: column;
    }

    .sr-btn {
        width: 100%;
    }

    .sr-success-actions {
        flex-direction: column;
    }
}

/* Search Form */
.sr-search-form {
    margin: 2rem 0;
    width: 100%;
}

.sr-search-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sr-search-input {
    flex: 1;
    min-width: 0;
}

.sr-search-btn {
    white-space: nowrap;
}

.sr-clear-btn {
    white-space: nowrap;
}

/* Pagination */
.sr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sr-border);
    width: 100%;
    flex-wrap: wrap;
}

.sr-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    padding: 0 1rem;
    background: var(--sr-white);
    border: 2px solid var(--sr-border);
    border-radius: var(--sr-radius);
    color: var(--sr-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sr-pagination-link:hover {
    border-color: var(--sr-primary);
    background: var(--sr-bg);
    color: var(--sr-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.sr-pagination-link.sr-active {
    background: var(--sr-primary);
    border-color: var(--sr-primary);
    color: var(--sr-white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sr-pagination-dots {
    color: var(--sr-text-light);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

.sr-prev, .sr-next {
    padding: 0 1.5rem;
    background: var(--sr-bg);
}

@media (max-width: 480px) {
    .sr-search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sr-pagination {
        gap: 0.25rem;
    }
    
    .sr-pagination-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}