/**
 * Sign Up Page Custom Styles - Premium Islamic Finance Theme
 */

:root {
    --auth-primary: #064e3b;
    --auth-secondary: #059669;
    --auth-accent: #d1a054;
    --auth-bg-light: #f0fdf4;
    --auth-text-dark: #064e3b;
    --auth-text-muted: #4b5563;
}

/* Sign Up specific header styling - Professional white background */
.page-header .card-header {
    background: transparent !important;
    border-radius: 1.5rem 1.5rem 0 0;
    padding: 2.5rem 2rem 1rem !important;
    color: var(--auth-text-dark);
    margin: 0 !important;
    border-bottom: none !important;
    text-align: center;
}

/* Override Bootstrap default card header background/border */
.page-header .card .card-header {
    background-color: transparent !important;
    border-bottom: none !important;
}

/* Extra specificity for signup card header to ensure transparency */
.page-header .card.card-plain>.card-header,
.page-header .card.card-plain>.card-header.header-logo-section {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Highest-specificity fallback to keep the logo strip transparent even after late-loading CSS */
body.auth-page .page-header .card.card-plain>.card-header.header-logo-section {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure the logo strip stays transparent */
.page-header .card-header.header-logo-section {
    background: transparent !important;
    border-bottom: none !important;
}

/* Card styling for signup - remove top margin */
.page-header .card {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove card top margin on all auth pages */
.card.card-plain {
    margin-top: 0 !important;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

.card.card-plain.mt-0 {
    margin-top: 0 !important;
}

/* Header logo section */
.header-logo-section {
    padding-top: 0.5rem !important;
    padding-bottom: 0.3rem !important;
}

/* Logo container - old style (left aligned) */
.logo-container {
    display: flex;
    align-items: center;
}

/* Logo container - centered */
.logo-container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.75rem;
}

/* Header logo image - Force exact size */
.header-logo {
    height: 70px !important;
    width: 70px !important;
    max-height: 70px !important;
    max-width: 70px !important;
    object-fit: contain !important;
    display: block !important;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Ensure picture tag doesn't add extra space */
.logo-container-center picture {
    display: inline-block;
    line-height: 0;
}

.page-header .card-header h3 {
    color: #344767;
    font-weight: 700;
    margin-bottom: 0.3rem;
    margin-top: 0.3rem;
    font-size: 1.5rem;
    text-align: left;
}

.page-header .card-header p {
    color: #67748e;
    margin: 0.15rem 0 0.3rem 0;
    font-size: 0.95rem;
    text-align: left;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--auth-text-dark);
    margin-top: 1rem;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Sign Up form specific */
.page-header .card-body {
    padding: 1.5rem 2rem 2rem !important;
}

/* Sign Up button styling - Professional blue gradient */
.btn-gradient-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%) !important;
    border: none !important;
    padding: 0.875rem;
    font-weight: 700;
    border-radius: 0.75rem;
    color: white !important;
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(6, 78, 59, 0.2);
    color: white;
}

/* Sign up background image */
.signup-bg-image {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

.blur-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Device security badge - Professional styling */
.device-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.25rem !important;
}

.device-badge i {
    color: white;
    font-size: 1.2rem;
}

.device-badge .text-white {
    color: white !important;
    font-weight: 600;
}

.device-badge small {
    color: rgba(255, 255, 255, 0.9);
}

/* Logo styling for sign up */
.card-header picture {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    background: transparent !important;
}

.card-header img {
    max-height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Header flex layout */
.card-header .d-flex {
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

/* Back home button styling - Professional white button, centered */
.back-home-btn {
    color: var(--auth-primary) !important;
    border: 2px solid var(--auth-primary) !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.5rem !important;
    background: transparent !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-home-btn:hover {
    background: var(--auth-primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-icon-primary {
    color: var(--auth-primary);
}

/* Form labels */
.form-label {
    font-weight: 700;
    color: var(--auth-text-dark);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Form inputs */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.1);
}

.auth-signup-btn {
    background: var(--auth-primary) !important;
    color: white !important;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
}

/* Footer styling */
.card-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 1rem 1rem;
}

/* Sign in link */
.card-footer .btn-gradient-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
}

.modal-header-gradient {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-secondary) 100%);
}

/* Device confirmation modal */
.device-icon-container {
    background: #f8f9fa;
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.device-icon {
    color: #667eea;
    font-size: 2rem;
}

/* Terms modal */
.modal-content {
    border: none;
    border-radius: 1rem;
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    color: #344767;
    font-weight: 600;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Password toggle buttons */
.password-toggle-btn {
    background: transparent;
    border: none;
    color: var(--auth-primary);
    cursor: pointer;
}

.password-toggle-btn:hover {
    color: var(--auth-secondary);
}

/* Checkbox styling */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 0.25rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

/* Responsive design */
@media (max-width: 768px) {
    .card-header {
        padding: 1.5rem 1rem;
    }

    .card-body {
        padding: 1.5rem 1rem;
    }

    .signup-bg-image {
        display: none !important;
    }

    .page-header {
        min-height: auto !important;
    }

    .col-md-6 {
        display: none;
    }

    .col-md-4 {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}