/**
 * PhoneBot Register Page Styles
 * Modern UI Design Implementation
 * Author: Frontend Developer
 * Date: 2024
 */

/* ===== GOOGLE FONTS IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== BRAND COLORS ===== */
:root {
    --primary-color: #ea5e67;        /* Main brand red/pink */
    --secondary-color: #ffa200;      /* Orange accent */
    --warning-color: #f8b317;        /* Yellow accent */  
    --dark-color: #191919;           /* Dark text/backgrounds */
    --light-color: #f3f3f3;          /* Light background */
    --border-color: #343434;         /* Standard borders */
    --light-border: #d4d4d4;         /* Light borders */
    --success-color: #4caf50;        /* Success green */
    --danger-color: #F44336;         /* Error red */
    --text-muted: #9d9d9d;           /* Muted text */
}

/* ===== REGISTER PAGE CONTAINER ===== */
.register-page-container {
    background: var(--light-color);
    min-height: 100vh;
    padding: 40px 0;
}

.register-page-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ===== HEADER SECTION ===== */
.register-header {
    text-align: center;
    padding: 50px 40px 30px;
    background: #ffffff;
}

.register-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 48px;
    font-weight: 700;
    font-style: normal;
    line-height: 40px;
    letter-spacing: 0%;
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 15px;
    text-transform: none;
}

.register-header h1:after {
    display: none; /* Remove the default line */
}

.register-login-prompt {
    color: #666666;
    font-size: 13px;
    margin-bottom: 15px;
    font-weight: 400;
}

.register-login-link {
    display: block;
    width: 100%;
    background: var(--secondary-color);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;
    text-transform: none;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}



.register-login-link:hover {
    background: #e6940d; /* Darker orange */
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 148, 13, 0.3);
}

/* ===== FORM SECTIONS ===== */
.register-form-container {
    padding: 0 40px 40px;
}

.register-section {
    margin-bottom: 45px;
}

.register-section-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 0;
    border-bottom: none;
}

.register-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 400;
    font-style: normal;
    line-height: 40px;
    letter-spacing: 0%;
    text-align: center;
    color: #666666;
    margin: 0;
    text-transform: none;
}

/* ===== FORM GROUPS ===== */
.register-form-group {
    margin-bottom: 18px;
}

/* Focus styling removed - labels should not change color on focus */

.register-form-control.has-value {
    border-color: #c0c0c0;
}

.register-form-row {
    display: flex;
    gap: 15px;
}

.register-form-row .register-form-group {
    flex: 1;
}

.register-form-label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    font-style: normal;
    line-height: 24px;
    letter-spacing: 0%;
    color: var(--dark-color);
    margin-bottom: 6px;
}

.register-form-control {
    width: 100%;
    height: 45px;
    padding: 0 18px;
    border: 1px solid #e0e0e0;
    border-radius: 22px;
    font-size: 13px;
    color: var(--dark-color);
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.sbHolder{
    border: 1px solid #e0e0e0;
    border-radius:4px;
    color: var(--dark-color);
}
.sbToggle{
    
    color: var(--text-muted);
}
.register-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 94, 103, 0.1);
}

.register-form-control::placeholder {
    color: #999999;
    font-size: 13px;
    font-weight: 400;
}

/* ===== SELECT STYLING ===== */
.register-select-wrapper {
    position: relative;
}

.register-form-select {
    width: 100%;
    height: 45px;
    padding: 0 18px;
    border: 1px solid #e0e0e0;
    border-radius: 22px;
    font-size: 13px;
    color: var(--dark-color);
    background: #ffffff;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.register-form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 94, 103, 0.1);
}

/* ===== VALIDATION STYLING ===== */
.register-form-group.required .register-form-label::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 5px;
    font-weight: bold;
}

.register-error-message {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Error styling - only affects form controls and error messages, NOT labels */
.register-form-control.error,
.register-form-select.error {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1) !important;
}

/* Ensure labels do NOT change color when there's an error */
.register-form-group.has-error .register-form-label {
    color: var(--text-color) !important; /* Keep original label color */
}

/* Only error messages should be red */
.register-form-group .error,
.register-error-message {
    color: var(--danger-color) !important;
}

/* ===== NEWSLETTER SECTION ===== */
.register-newsletter {
    text-align: left;
    margin-bottom: 25px;
}

.register-newsletter-title {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 400;
    font-style: normal;
    line-height: 40px;
    letter-spacing: 0%;
    text-align: center;
    color: #666666;
    margin-bottom: 25px;
}

.register-toggle-group {
    display: block;
    text-align: left;
    margin-bottom: 20px;
}

.register-toggle-label {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    font-style: normal;
    line-height: 24px;
    letter-spacing: 0%;
    color: var(--dark-color);
    cursor: pointer;
    margin: 0 0 6px 0;
    display: block;
}

.register-toggle-wrapper {
    margin-top: 6px;
}

/* ===== TOGGLE SWITCH STYLING ===== */
.register-toggle-wrapper {
    position: relative !important;
    display: inline-block !important;
    vertical-align: middle;
}

.register-toggle-input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
}

.register-toggle-slider {
    position: relative !important;
    display: inline-block !important;
    width: 44px !important;
    height: 24px !important;
    background-color: #ccc !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: none !important;
    outline: none !important;
}

.register-toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    top: 3px !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.register-toggle-input:checked + .register-toggle-slider {
    background-color: #ffa200 !important;
}

.register-toggle-input:checked + .register-toggle-slider:before {
    transform: translateX(20px) !important;
}

.register-toggle-input:focus + .register-toggle-slider {
    box-shadow: 0 0 0 3px rgba(255, 162, 0, 0.3) !important;
}

input[type=checkbox]+label:after{
    display: none;
}

/* Override any existing checkbox styles for toggle */
.register-newsletter input[type="checkbox"].register-toggle-input {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Privacy checkbox styling */
.register-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin: 0 8px 0 0 !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

/* ===== RECAPTCHA STYLING ===== */
.register-recaptcha {
    display: flex;
    justify-content: start;
    margin-bottom: 20px;
}

/* ===== PRIVACY POLICY ===== */
.register-privacy {
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    font-style: normal;
    line-height: 24px;
    letter-spacing: 0%;
    color: var(--text-muted);
}

.register-privacy a {
    color: var(--primary-color);
    text-decoration: none;
}

.register-privacy a:hover {
    text-decoration: underline;
}

label[for="agree1"] {
    display: none;
}
/* ===== PRIVACY AGREEMENT ERROR CONTAINER ===== */
.register-agree-error-container {
    text-align: center;
    margin-bottom: 20px;
}

.register-agree-error-container .error {
    color: var(--danger-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    margin: 5px 0;
    display: block;
}

/* ===== SUBMIT BUTTON ===== */
.register-submit-section {
    text-align: center;
}

.register-submit-btn {
    width: 100%;
    background: var(--secondary-color);
    color: #ffffff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s ease;
    height: auto;
    position: relative;
    text-align: center;
}

.register-submit-btn::after {
    content: '→';
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
}

.register-submit-btn:hover {
    background: #e6940d; /* Darker orange */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 148, 13, 0.3);
}

.register-submit-btn:active,
.register-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 162, 0, 0.3);
    color: #ffffff !important;
}

.register-submit-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.register-submit-btn[disabled]:hover {
    background: var(--secondary-color);
    transform: none;
    box-shadow: none;
}



/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Styles */
@media (max-width: 768px) {
    .register-page-wrapper {
        margin: 0 20px;
        border-radius: 6px;
    }
    
    .register-header,
    .register-form-container {
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .register-header h1 {
        font-family: 'Poppins', sans-serif;
        font-size: 40px;
        font-weight: 700;
        font-style: normal;
        line-height: 36px;
        letter-spacing: 0%;
        text-align: center;
    }
    
    .register-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Mobile Styles */
@media (max-width: 600px) {
    .register-page-container {
        padding: 20px 0;
    }
    
    .register-page-wrapper {
        margin: 0 15px;
        border-radius: 4px;
    }
    
    .register-header,
    .register-form-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .register-header {
        padding-top: 30px;
        padding-bottom: 15px;
    }
    
    .register-header h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .register-section-title {
        font-family: 'Poppins', sans-serif;
        font-size: 24px;
        font-weight: 400;
        line-height: 30px;
        letter-spacing: 0%;
        text-align: center;
    }
    
    .register-form-control,
    .register-form-select {
        height: 42px;
        padding: 0 15px;
        font-size: 13px;
    }
    
    .register-submit-btn {
        width: 100%;
        padding: 14px 20px;
        font-family: 'Poppins', sans-serif;
        font-size: 15px;
        font-weight: 600;
        line-height: 22px;
        letter-spacing: 0%;
        height: auto;
    }
    
    .register-submit-btn::after {
        right: 20px;
        font-size: 16px;
    }
    
    .register-toggle-group {
        display: block;
        text-align: left;
    }
    
    .register-toggle-slider {
        width: 40px;
        height: 22px;
    }
    
    .register-toggle-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        top: 3px;
    }
    
    .register-toggle-input:checked + .register-toggle-slider:before {
        transform: translateX(18px);
    }
}

/* Small Mobile Styles */
@media (max-width: 400px) {
    .register-page-wrapper {
        margin: 0 10px;
    }
    
    .register-header,
    .register-form-container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .register-header h1 {
        font-family: 'Poppins', sans-serif;
        font-size: 32px;
        font-weight: 700;
        font-style: normal;
        line-height: 28px;
        letter-spacing: 0%;
        text-align: center;
    }
    
    .register-section-title {
        font-family: 'Poppins', sans-serif;
        font-size: 20px;
        font-weight: 400;
        line-height: 26px;
        letter-spacing: 0%;
        text-align: center;
    }
    
    .register-form-control,
    .register-form-select {
        height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }
    
    .register-form-label {
        font-size: 12px;
    }
    
    .register-submit-btn {
        padding: 12px 16px;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        letter-spacing: 0%;
        height: auto;
    }
    
    .register-submit-btn::after {
        right: 16px;
        font-size: 16px;
    }
    
    .register-login-link {
        padding: 12px 16px;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        letter-spacing: 0%;
    }
    

}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .register-form-control,
    .register-form-select {
        border-width: 2px;
    }
    
    .register-form-control:focus,
    .register-form-select:focus {
        box-shadow: 0 0 0 3px #000;
    }
}

/* ===== INTEGRATION WITH EXISTING THEME ===== */
.register-page-container .breadcrumb-category {
    background: var(--light-color);
}

.register-page-container .container {
    background: transparent;
}

/* Ensure proper spacing from header */
.register-page-container {
    margin-top: 0;
    padding-top: 20px;
}

/* ===== NEWSLETTER RADIO BUTTON OVERRIDE ===== */
.register-newsletter input[type="radio"] {
    display: none;
}

.register-newsletter .radio-inline {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

/* ===== CUSTOM FIELDS STYLING ===== */
.register-form-group.custom-field .register-form-control {
    background: #fff;
}

.register-form-group.custom-field .register-form-select {
    background: #fff;
}

/* ===== CUSTOMER GROUP RADIO BUTTONS ===== */
.register-form-group .radio {
    margin-bottom: 10px;
}

.register-form-group .radio label {
    font-weight: normal;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.register-form-group .radio label:hover {
    border-color: var(--primary-color);
    background: rgba(234, 94, 103, 0.05);
}

.register-form-group .radio input[type="radio"] {
    margin-right: 10px;
}

/* ===== FORM VALIDATION STATES ===== */
.register-form-control.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.register-form-select.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* ===== CAPTCHA STYLING ===== */
.register-recaptcha {
    margin-bottom: 20px;
}

#Google_reCAPTCHA_render {
    transform: scale(0.9);
    transform-origin: 0 0;
}

/* ===== EXISTING FORM ELEMENTS OVERRIDE ===== */
.register-page-wrapper .form-control {
    height: 50px;
    border-radius: 25px;
    border: 1px solid #ddd;
    padding: 0 20px;
}

.register-page-wrapper .btn-primary {
    background: var(--secondary-color);
    border: none;
    border-radius: 25px;
    padding: 15px 40px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.register-page-wrapper .btn-primary:hover {
    background: var(--primary-color);
}

/* ===== CHECKBOX IMPROVEMENTS ===== */
/* Legacy checkbox styling - now replaced with toggle */
.register-checkbox {
    display: none;
}

/* ===== TERMS AND CONDITIONS STYLING ===== */
.register-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid #e9ecef;
}

.register-privacy #agree-checkbox {
    margin-top: 1px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
}

.register-privacy #agree-checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== ALERT STYLING OVERRIDE ===== */
.register-page-container .alert {
    position: relative;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* ===== BREADCRUMB OVERRIDE ===== */
.register-page-container .breadcrumb-category {
    margin-bottom: 0;
    padding: 10px 0;
}

/* ===== LOADING STATES ===== */
.register-submit-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.register-submit-btn.loading {
    position: relative;
    color: transparent;
}

.register-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== FORM FOCUS IMPROVEMENTS ===== */
.register-form-control:focus,
.register-form-select:focus {
    animation: gentle-glow 0.3s ease;
}

@keyframes gentle-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 94, 103, 0.3);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(234, 94, 103, 0.2);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(234, 94, 103, 0.1);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .register-page-container {
        background: white;
        padding: 0;
    }
    
    .register-page-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .register-submit-btn,
    .register-recaptcha {
        display: none;
    }
}

/* ===== TOGGLE SWITCH FORCED STYLING ===== */
/* These styles ensure the toggle appears even if other CSS conflicts */
label.register-toggle-slider {
    display: inline-block !important;
    position: relative !important;
    width: 44px !important;
    height: 24px !important;
    background: #ccc !important;
    border-radius: 24px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

label.register-toggle-slider::before {
    content: '' !important;
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 18px !important;
    height: 18px !important;
    background: white !important;
    border-radius: 50% !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

input.register-toggle-input {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

input.register-toggle-input:checked + label.register-toggle-slider {
    background: #ffa200 !important;
}

input.register-toggle-input:checked + label.register-toggle-slider::before {
    transform: translateX(20px) !important;
}

input.register-toggle-input:focus + label.register-toggle-slider {
    box-shadow: 0 0 0 3px rgba(255, 162, 0, 0.3) !important;
}

