/* School Admission Pro - Public Form Styles */

/* --- Phase 6: Animated Landing Page --- */
#sap-landing-page {
    position: relative;
    width: 100%;
    min-height: 500px;
    background: #003087;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 48, 135, 0.3);
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Background Animated Geomteric Shapes */
.sap-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.18);
    animation: sapDrift 20s infinite alternate ease-in-out;
    pointer-events: none; /* Let clicks pass through to buttons */
}

.sap-shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.sap-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
    animation-duration: 25s;
}

.sap-shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
    animation-duration: 18s;
}

@keyframes sapDrift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 40px) rotate(45deg); }
}

/* Landing Page Content */
.sap-landing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
}

.sap-landing-title {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    color: #ffffff; /* Override any theme colors */
}

/* Glassmorphism Buttons */
.sap-landing-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.sap-btn-glass {
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#sap-btn-new-admission {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#sap-btn-new-admission:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#sap-btn-reregister {
    background: rgba(255, 255, 255, 0.05); /* Muted */
    color: rgba(255, 255, 255, 0.6); /* Muted */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: not-allowed;
    position: relative;
}

#sap-btn-reregister:hover::after {
    content: "Coming Soon";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Hide Wizard Initially */
#sap-wizard-content {
    display: none;
}

/* Ensure original wizard container layout is still smooth when revealed */
.sap-wizard-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: transparent; /* Changed from white to prevent double boxing if themes wrap it */
}

/* Inner content box for the actual wizard steps since container is now transparent */
#sap-wizard-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}


/* Progress bar */
.sap-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.sap-step {
    font-weight: 600;
    color: #999;
}

.sap-step.step-active {
    color: #0073aa;
    border-bottom: 2px solid #0073aa;
    margin-bottom: -17px;
}

/* Step Layout */
.sap-form-step {
    animation: sapFadeIn 0.3s ease-in-out;
}

@keyframes sapFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.sap-form-row {
    margin-bottom: 20px;
}

.sap-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.sap-form-row input[type="text"],
.sap-form-row input[type="email"],
.sap-form-row input[type="date"],
.sap-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.sap-input-group {
    display: flex;
    gap: 10px;
}

.sap-input-group input {
    flex: 1;
}

#sap-otp-container {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 3px solid #0073aa;
}

/* Actions */
.sap-step-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

.sap-step-actions .sap-btn-next {
    margin-left: auto;
}

.sap-btn-primary,
.sap-btn-secondary,
.sap-btn-next,
.sap-btn-prev {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.sap-btn-next,
.sap-btn-primary {
    background: #0073aa;
    color: #fff;
}

.sap-btn-prev,
.sap-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.sap-success-msg {
    text-align: center;
    padding: 40px;
    color: #155724;
    background-color: #d4edda;
    border-radius: 8px;
}

/* Phase 4 additions */
.sap-drop-zone {
    border: 2px dashed #0073aa;
    padding: 20px;
    text-align: center;
    background: #fdfdfd;
    transition: all 0.3s ease;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}
.sap-drop-zone.dragover {
    background: #eef7fd;
    border-color: #005177;
    box-shadow: inset 0 0 10px rgba(0, 115, 170, 0.2);
}
.sap-drop-zone.has-file {
    background: #e6fced;
    border-color: #00a037;
    border-style: solid;
}
.sap-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: sap-spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes sap-spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sap-wizard-container {
        padding: 15px;
    }
    
    .sap-progress-bar {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .sap-step {
        font-size: 13px;
        text-align: center;
        flex: 1 1 40%;
        padding-bottom: 10px;
    }
    
    .sap-step.step-active {
        margin-bottom: -12px;
    }
    
    .sap-input-group {
        flex-direction: column;
    }
    
    .sap-step-actions {
        flex-direction: column-reverse;
        gap: 15px;
    }
    
    .sap-step-actions button {
        width: 100%;
        margin-left: 0 !important;
    }
}