/* =========================================================
   MODERN LOGIN & REGISTER UX/UI
   ========================================================= */

/* 1. Hide Default Title */
.woocommerce-account .entry-title {
    display: none; 
}

/* 2. Main Container (Flexbox for Side-by-Side or Centered) */
.woocommerce-account .u-columns.col2-set,
.woocommerce-account #customer_login {
    display: flex !important;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    max-width: 1000px;
    margin: 50px auto;
    width: 100%;
}

/* 3. The Card Style (White box, shadow, rounded) */
.woocommerce-account .u-column1, 
.woocommerce-account .u-column2,
.woocommerce form.register, 
.woocommerce form.login {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Soft shadow */
    border: 1px solid #e2e8f0;
    flex: 1;
    min-width: 320px;
    max-width: 480px; /* Optimal width for forms */
    box-sizing: border-box;
    /* Top border color default (Grey) - will be overridden by role */
    border-top: 4px solid #cbd5e1; 
    margin: 0 auto; /* Centering if alone */
}

/* 4. Headings inside the card */
.woocommerce-account h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

/* 5. Form Fields (Inputs) */
.woocommerce form .form-row {
    margin-bottom: 20px;
    padding: 0;
}

.woocommerce form .form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.woocommerce form .form-row .input-text,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px; /* Comfortable padding */
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8fafc; /* Light grey bg */
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    height: 48px; /* Taller inputs */
}

/* Focus State (Highlight) */
.woocommerce form .form-row .input-text:focus,
.woocommerce form .form-row select:focus {
    background-color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 6. Buttons (Call to Action) */
.woocommerce button.button[name="login"],
.woocommerce button.button[name="register"] {
    width: 100%;
    padding: 16px !important;
    margin-top: 15px;
    background-color: #0f172a !important; /* Default dark blue */
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s;
}

.woocommerce button.button:hover {
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 7. Dynamic Header (Icon + Role Title) */
.bgc-register-header {
    text-align: center;
    margin-bottom: 40px;
}
.bgc-register-header .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    color: #cbd5e1; 
    display: inline-block;
}
.bgc-register-header h2 {
    border: none;
    padding: 0;
    margin-bottom: 8px;
    font-size: 28px;
    color: #0f172a;
}
.bgc-register-header p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
}

/* 8. ROLE-SPECIFIC COLORS (UX Magic) */

/* --- PUBLISHER (Violet) --- */
.bgc-role-prefill-publisher .u-column2,
.bgc-role-prefill-publisher form.register { border-top-color: #d946ef !important; }

.bgc-title-publisher .dashicons { color: #d946ef !important; }

.bgc-role-prefill-publisher button[name="register"] { 
    background-color: #d946ef !important; 
}
.bgc-role-prefill-publisher button[name="register"]:hover {
    background-color: #c026d3 !important;
    box-shadow: 0 4px 12px rgba(217, 70, 239, 0.3);
}

/* --- RETAILER (Green) --- */
.bgc-role-prefill-retailer .u-column2,
.bgc-role-prefill-retailer form.register { border-top-color: #10b981 !important; }

.bgc-title-retailer .dashicons { color: #10b981 !important; }

.bgc-role-prefill-retailer button[name="register"] { 
    background-color: #10b981 !important; 
}
.bgc-role-prefill-retailer button[name="register"]:hover {
    background-color: #059669 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* --- GAMER (Orange) --- */
.bgc-role-prefill-gamer .u-column2,
.bgc-role-prefill-gamer form.register,
.bgc-role-prefill-customer .u-column2,
.bgc-role-prefill-customer form.register { border-top-color: #F97316 !important; }

.bgc-title-gamer .dashicons { color: #F97316 !important; }

.bgc-role-prefill-gamer button[name="register"],
.bgc-role-prefill-customer button[name="register"] { 
    background-color: #F97316 !important; 
}
.bgc-role-prefill-gamer button[name="register"]:hover,
.bgc-role-prefill-customer button[name="register"]:hover {
    background-color: #EA580C !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* 9. "Change Role" Link Style */
.bgc-role-locked {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    margin-bottom: 25px;
}
.bgc-role-locked a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}
.bgc-role-locked a:hover { text-decoration: underline; }