@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #FF9933; /* Saffron */
    --primary-gradient: linear-gradient(135deg, #FF9933 0%, #FF8000 100%);
    --primary-hover-gradient: linear-gradient(135deg, #FF881A 0%, #E67300 100%);
    --gold-color: #D4AF37; /* Gold */
    --gold-hover-color: #AA8417;
    --dark-color: #2D3748; /* Dark Gray */
    --text-muted: #718096;
    --border-color: #E2E8F0;
    --bg-light: #F7FAFC;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.03);
}

body.register-page {
    font-family: 'Outfit', sans-serif;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 250, 252, 0.92) 100%), url('../assets/images/temple_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

/* Subtle top border accent with saffron gradient */
body.register-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary-gradient);
    z-index: 10;
}

.register-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 5;
}

/* Logo and Header Styling */
.logo-header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.logo-header img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-header img:hover {
    transform: scale(1.08);
}

.logo-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.logo-header h1 span.tdms-text {
    font-weight: 400;
    color: var(--primary-color);
    display: block;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.logo-header p.subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0 0;
    font-style: italic;
    font-weight: 500;
}

/* Card Styling */
.register-card {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    width: 100%;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.register-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
}

.card-title-custom {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--dark-color);
    letter-spacing: -0.2px;
}

/* Form Groups */
.form-group-custom {
    margin-bottom: 16px;
}

.form-group-custom label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    display: block;
}

.input-group-custom {
    display: flex;
    align-items: center;
    position: relative;
}

.input-group-custom .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-group-custom .form-control {
    width: 100%;
    padding: 9px 14px 9px 36px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #FAFBFD;
    transition: all 0.2s ease;
    color: var(--dark-color);
    font-family: inherit;
}

.input-group-custom .form-control:focus {
    border-color: var(--primary-color);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.15);
    outline: none;
}

.input-group-custom .form-control:focus ~ .input-icon {
    color: var(--primary-color);
}

/* Password Toggle Specifics */
.input-group-custom .form-control.password-input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    height: 100%;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle:focus {
    outline: none;
}

/* Actions styling: Remember Me & Forgot Password & Terms Check */
.form-check-custom {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-check-custom input {
    cursor: pointer;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-check-custom label {
    cursor: pointer;
    margin-bottom: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #FF8000;
    text-decoration: underline;
}

/* Submit Button */
.btn-register {
    width: 100%;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 153, 51, 0.2);
    font-family: inherit;
    margin-top: 10px;
}

.btn-register:hover {
    background: var(--primary-hover-gradient);
    box-shadow: 0 6px 14px rgba(255, 153, 51, 0.3);
}

.btn-register:active {
    transform: scale(0.99);
}

.btn-register:disabled {
    background: #CBD5E1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Spinner inside button */
.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Custom Alert Message styling */
.alert-danger-custom {
    background-color: #FFF5F5;
    border: 1px solid #FED7D7;
    color: #C53030;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

/* Validation Messages below Fields */
.invalid-feedback-custom {
    color: #E53E3E;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 4px;
    display: none;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.2s ease-out;
}

.is-invalid-custom {
    border-color: #E53E3E !important;
    background-color: #FFF5F5 !important;
}

.is-invalid-custom:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
}

.is-invalid-custom ~ .input-icon {
    color: #E53E3E !important;
}

/* Footer Copyright */
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated Background Blobs */
.bg-bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 153, 51, 0.12) 0%, rgba(212, 175, 55, 0) 70%);
    filter: blur(20px);
    animation: floatAnimation 20s infinite ease-in-out;
}

.bg-bubble:nth-child(1) {
    width: 350px;
    height: 350px;
    left: -50px;
    top: -50px;
    animation-duration: 25s;
    animation-delay: 0s;
}

.bg-bubble:nth-child(2) {
    width: 450px;
    height: 450px;
    right: -100px;
    bottom: -100px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.bg-bubble:nth-child(3) {
    width: 280px;
    height: 280px;
    left: 60%;
    top: 15%;
    animation-duration: 22s;
    animation-delay: -10s;
}

.bg-bubble:nth-child(4) {
    width: 380px;
    height: 380px;
    left: 20%;
    bottom: 10%;
    animation-duration: 28s;
    animation-delay: -15s;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-80px) scale(1.15) rotate(180deg);
        opacity: 0.75;
    }
    100% {
        transform: translateY(0) scale(1) rotate(360deg);
        opacity: 0.4;
    }
}

/* Register Page convenience and mobile improvements */
.register-card {
    animation: fadeInUp 0.45s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .register-container { max-width: 100%; padding: 14px; }
    .register-card { padding: 24px; }
    .logo-header h1 { font-size: 1.25rem; }
    .logo-header span.tdms-text { font-size: 0.85rem; }
    .form-actions-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .input-group-custom .form-control { padding: 12px 14px 12px 42px; }
    .btn-register { padding: 12px; }
}

/* SweetAlert2 themed popups for register pages */
.tdms-swal-popup {
    border-radius: 18px !important;
    border: 1px solid rgba(255, 153, 51, 0.18) !important;
    box-shadow: 0 18px 42px rgba(255, 153, 51, 0.14) !important;
}
.tdms-swal-title {
    color: #0d47a1 !important;
    font-weight: 700 !important;
}
.tdms-swal-text {
    color: #475569 !important;
    font-size: 0.95rem !important;
}
.tdms-swal-confirm-button,
.tdms-swal-cancel-button {
    border-radius: 10px !important;
    padding: 0.85rem 1.35rem !important;
}
