/* ========================================
   YMCA Philippines - Authentication Styles
   ======================================== */

/* Auth Page Layout - Updated with Background */
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 32%),
        radial-gradient(circle at top right, rgba(230, 0, 18, 0.24) 0%, rgba(230, 0, 18, 0) 36%),
        linear-gradient(135deg, rgba(0, 51, 160, 0.82) 0%, rgba(230, 0, 18, 0.72) 100%),
        url('images/ymca.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-page .navbar {
    display: none;
}

/* Back to Home Link */
.back-to-home {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    z-index: 10;
    transition: var(--transition);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.back-to-home:hover {
    color: #ffd700;
    transform: translateX(-3px);
}

.back-to-home svg {
    width: 20px;
    height: 20px;
}

/* Auth Container */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 40px;
}

/* Auth Card - Updated with glassmorphism effect */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-card.register-card-new {
    max-width: 520px;
    padding: 40px 50px;
}

/* Auth Logo */
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    clip-path: circle(50%);
    object-fit: cover;
    object-position: center;
    display: block;
    background: transparent;
    filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.18));
}

.logo-circle-large {
    width: 80px;
    height: 80px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

/* Auth Header - Updated */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--dark-gray);
}

/* Form Section */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--medium-gray);
}

/* Form Styles - Updated */
.auth-form.register-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group .hint {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 2px;
}

/* Form Options - Remember me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-dark);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--medium-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-red);
}

/* Form Actions */
.form-actions {
    margin-top: 10px;
}

.form-actions .btn-auth {
    width: 100%;
}

.plan-desc {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 4px;
}

/* Upload Help Text */
.upload-help {
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 10px;
    margin-top: -4px;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-dark);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.toggle-password.showing {
    color: var(--primary-red);
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--medium-gray);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary-red);
    background: rgba(230, 0, 18, 0.02);
}

.file-upload-area.dragover {
    border-color: var(--primary-red);
    background: rgba(230, 0, 18, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: #9ca3af;
}

.upload-text {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.upload-formats {
    font-size: 12px;
    color: var(--dark-gray);
}

/* Upload Preview */
.upload-preview {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-size: 13px;
    color: var(--white);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-file {
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 4px;
    color: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-file:hover {
    background: var(--primary-red);
}

/* Payment Options */
.payment-options {
    margin-top: 15px;
}

.payment-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.payment-option-card {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
}

.payment-option-card input {
    display: none;
}

.payment-option-content {
    padding: 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: var(--transition);
}

.payment-option-card input:checked + .payment-option-content {
    border-color: var(--primary-red);
    background: rgba(230, 0, 18, 0.02);
}

.payment-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.payment-icon {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
}

.payment-icon.gcash {
    color: #0066b2;
}

.payment-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.badge-new {
    padding: 2px 8px;
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: auto;
}

.payment-desc {
    font-size: 13px;
    color: var(--dark-gray);
    line-height: 1.5;
    padding-left: 30px;
}

/* Plan Summary Section */
.plan-summary-section {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 25px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.trial-badge {
    padding: 4px 10px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.plan-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-red);
    margin-bottom: 12px;
}

.plan-features {
    list-style: none;
    margin-bottom: 15px;
}

.plan-features li {
    font-size: 13px;
    color: var(--dark-gray);
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 600;
}

.trial-info {
    padding-top: 12px;
    border-top: 1px solid #bfdbfe;
}

.trial-info p {
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.trial-info p strong {
    color: var(--text-dark);
}

.trial-info .after-trial {
    font-size: 11px;
}

/* Auth Button - Updated */
.btn-auth {
    padding: 14px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
}

.btn-auth svg {
    width: 18px;
    height: 18px;
}

.btn-trial {
    background: var(--primary-red);
}

/* Error & Success Messages */
.error-message {
    background: rgba(230, 0, 18, 0.1);
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #15803d;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--medium-gray);
}

.auth-footer p {
    font-size: 14px;
    color: var(--dark-gray);
}

.auth-footer a {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card,
    .auth-card.register-card-new {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-header h2 {
        font-size: 22px;
    }
    
    .back-to-home {
        font-size: 13px;
    }
    
    .payment-option-content {
        padding: 12px;
    }
    
    .payment-desc {
        padding-left: 0;
        padding-top: 8px;
        margin-top: 8px;
        border-top: 1px solid var(--medium-gray);
    }
    
    .plan-summary-section {
        padding: 15px;
    }
}
