/**
 * Client Registration Styles
 * 
 * Styles for the registration form
 * 
 * @package YOOPixel Management
 * @subpackage Assets
 * @since 2.1.0
 * @version 1.0.0
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ========================================
   Registration Wrapper
   ======================================== */

/* Force responsive behavior */
html {
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
}

body.yoopxl-registration-page {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: url('../images/background.png') center center no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    overflow-x: hidden !important;
    overflow-y: auto !important; /* السماح بالتمرير العمودي */
    -webkit-overflow-scrolling: touch !important; /* تحسين التمرير على iOS */
}


/* Hide header and footer on registration page */
body.yoopxl-registration-page header,
body.yoopxl-registration-page .site-header,
body.yoopxl-registration-page .fusion-header,
body.yoopxl-registration-page .avada-header,
body.yoopxl-registration-page #header,
body.yoopxl-registration-page .header,
body.yoopxl-registration-page footer,
body.yoopxl-registration-page .site-footer,
body.yoopxl-registration-page .fusion-footer,
body.yoopxl-registration-page .avada-footer,
body.yoopxl-registration-page #footer,
body.yoopxl-registration-page .footer {
    display: none !important;
    visibility: hidden !important;
}

.yoopxl-registration-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px 24px !important;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    margin: 0 !important;
    max-width: none !important;
}

.yoopxl-registration-container {
    display: flex !important;
    flex-direction: row !important;
    max-width: 1100px !important;
    width: 100% !important;
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    min-height: 600px !important;
    max-height: 90vh !important;
    animation: slideUp 0.4s ease !important;
    position: relative !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    height: auto !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Two Column Layout
   ======================================== */

/* Close Modal Button */
.yoopxl-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #718096;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* تحسين زر الإغلاق للشاشات الصغيرة */
@media (max-width: 576px) {
    .yoopxl-close-modal {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
    
    .yoopxl-close-modal .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 360px) {
    .yoopxl-close-modal {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
    }
    
    .yoopxl-close-modal .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
}

.yoopxl-close-modal:hover {
    color: #fff;
    background: #EEB44E;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(238, 180, 78, 0.3);
}

.yoopxl-close-modal .dashicons {
    font-family: dashicons !important;
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.yoopxl-registration-left {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: visible;
    min-width: 0;
}

.yoopxl-registration-right {
    flex: 1;
    background: #f8f9fa url('../images/background.jpg') left center no-repeat;
    background-size: cover;
    position: relative;
    display: none;
}

/* إظهار الصورة الجانبية فقط في الشاشات الكبيرة (أكبر من 768px) */
@media (min-width: 768px) {
    .yoopxl-registration-right {
        display: block;
    }
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.overlay-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.15);
    padding: 40px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.overlay-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.overlay-content p {
    font-size: 16px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Header
   ======================================== */

.yoopxl-registration-header {
    text-align: center;
    margin-bottom: 30px;
}

.yoopxl-logo {
    margin-bottom: 20px;
}

.yoopxl-logo img {
    max-width: 180px;
    height: auto;
}

.yoopxl-site-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

.yoopxl-registration-title {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px;
}

.yoopxl-registration-subtitle {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

/* ========================================
   Form
   ======================================== */

.yoopxl-registration-form {
    margin-bottom: 20px;
}

.yoopxl-form-group {
    margin-bottom: 20px;
}

.yoopxl-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.yoopxl-label .required {
    color: #e53e3e;
    margin-left: 2px;
}

.yoopxl-label .optional {
    font-weight: 400;
    color: #a0aec0;
    font-size: 13px;
}

.yoopxl-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #2d3748;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.yoopxl-input:focus {
    outline: none;
    border-color: #EEB44E;
    box-shadow: 0 0 0 3px rgba(238, 180, 78, 0.1);
}

.yoopxl-input.invalid {
    border-color: #fc8181;
}

.yoopxl-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.1);
}

.yoopxl-password-wrapper {
    position: relative;
}

.yoopxl-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.2s ease;
}

.yoopxl-toggle-password:hover {
    color: #EEB44E;
}

.yoopxl-toggle-password .dashicons {
    font-family: dashicons !important;
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.yoopxl-field-description {
    font-size: 13px;
    color: #718096;
    margin: 6px 0 0;
}

/* ========================================
   Checkbox
   ======================================== */

.yoopxl-checkbox-group {
    margin-bottom: 24px;
}

.yoopxl-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.yoopxl-checkbox-label input[type="checkbox"] {
    margin: 3px 10px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #EEB44E;
}

.yoopxl-checkbox-label a {
    color: #EEB44E;
    text-decoration: none;
}

.yoopxl-checkbox-label a:hover {
    text-decoration: underline;
}

/* ========================================
   Messages
   ======================================== */

.yoopxl-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - 40px);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 100002;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideDownMessage 0.3s ease-out;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* تحسين الرسائل للشاشات الصغيرة */
@media (max-width: 576px) {
    .yoopxl-message {
        top: 10px;
        width: calc(100% - 20px);
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 8px;
    }
}

@media (max-width: 360px) {
    .yoopxl-message {
        width: calc(100% - 16px);
        padding: 10px 14px;
        font-size: 12px;
    }
}

@keyframes slideDownMessage {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.yoopxl-message.success {
    background-color: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.yoopxl-message.error {
    background-color: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

.yoopxl-message.warning {
    background-color: #feebc8;
    color: #7c2d12;
    border-left: 4px solid #ed8936;
}

.yoopxl-message.info {
    background-color: #bee3f8;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

.yoopxl-message p {
    margin: 0;
}

/* ========================================
   Base Styles
   ======================================== */

.yoopxl-registration-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    font-family: inherit;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.yoopxl-registration-page * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ========================================
   Buttons
   ======================================== */

.yoopxl-form-actions {
    margin-top: 24px;
}

.yoopxl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.yoopxl-btn-primary {
    background: #EEB44E;
    color: #fff;
}

.yoopxl-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(238, 180, 78, 0.3);
    background: #d9a03d;
}

.yoopxl-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.yoopxl-btn.loading {
    pointer-events: none;
}

.yoopxl-btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yoopxl-btn-loader .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Footer
   ======================================== */

.yoopxl-registration-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.yoopxl-registration-footer p {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

.yoopxl-link {
    color: #EEB44E;
    text-decoration: none;
    font-weight: 600;
}

.yoopxl-link:hover {
    text-decoration: underline;
}

/* ========================================
   Benefits
   ======================================== */

.yoopxl-benefits {
    margin: 0;
    padding: 30px;
    position: relative;
    z-index: 1;
    background: #00000047;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.yoopxl-benefits h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 24px;
}

.yoopxl-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yoopxl-benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.6;
}

.yoopxl-benefits-list li:last-child {
    margin-bottom: 0;
}

.yoopxl-benefits-list .dashicons {
    font-family: dashicons !important;
    color: #EEB44E;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet and smaller */
@media (max-width: 768px) {
    .yoopxl-registration-wrapper {
        align-items: flex-start !important;
        padding: 20px 16px !important;
    }
    
    .yoopxl-registration-container {
        flex-direction: column;
        min-height: auto !important;
        margin: 20px 0 !important;
    }
    
    .yoopxl-registration-left {
        max-width: 100%;
        padding: 30px 25px;
    }
    
    /* الصورة الجانبية مخفية في الأجهزة الصغيرة، لا حاجة لقواعد إضافية */
}

/* Mobile */
@media (max-width: 576px) {
    body.yoopxl-registration-page {
        background-attachment: scroll !important; /* تحسين الأداء على الموبايل */
    }
    
    .yoopxl-registration-wrapper {
        padding: 15px 10px !important;
        align-items: flex-start !important;
    }
    
    .yoopxl-registration-container {
        border-radius: 12px !important;
        margin: 10px 0 !important;
        min-height: auto !important;
    }
    
    .yoopxl-registration-left {
        padding: 25px 20px;
    }
    
    /* الصورة الجانبية مخفية في الأجهزة الصغيرة */
    
    .yoopxl-registration-title {
        font-size: 20px;
    }
    
    .yoopxl-site-title {
        font-size: 24px;
    }
    
    .yoopxl-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .yoopxl-input {
        padding: 10px 14px;
        font-size: 16px; /* منع التكبير التلقائي في iOS */
    }
    
    .yoopxl-benefits {
        padding: 20px;
        margin: 0;
    }
    
    .yoopxl-benefits h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .yoopxl-registration-wrapper {
        padding: 10px 8px !important;
    }
    
    .yoopxl-registration-container {
        border-radius: 8px !important;
        margin: 5px 0 !important;
    }
    
    .yoopxl-registration-left {
        padding: 20px 15px;
    }
    
    /* الصورة الجانبية مخفية في الأجهزة الصغيرة */
    
    .yoopxl-registration-title {
        font-size: 18px;
    }
    
    .yoopxl-site-title {
        font-size: 22px;
    }
    
    .yoopxl-logo img {
        max-width: 150px;
    }
    
    .yoopxl-benefits {
        padding: 15px;
    }
    
    .yoopxl-benefits h3 {
        font-size: 16px;
    }
    
    .yoopxl-benefits-list li {
        font-size: 14px;
    }
}

/* Extra small screens (landscape phones) */
@media (max-width: 360px) {
    .yoopxl-registration-wrapper {
        padding: 8px 5px !important;
    }
    
    .yoopxl-registration-left {
        padding: 15px 12px;
    }
    
    .yoopxl-registration-right {
        display: none; /* إخفاء الصورة الجانبية تماماً في الشاشات الصغيرة جداً */
    }
    
    .yoopxl-registration-title {
        font-size: 16px;
    }
    
    .yoopxl-site-title {
        font-size: 20px;
    }
    
    .yoopxl-input {
        padding: 8px 12px;
    }
    
    .yoopxl-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* تحسينات إضافية للأجهزة المحمولة */
@media (max-width: 768px) {
    /* منع التكبير التلقائي في Safari */
    .yoopxl-input,
    .yoopxl-input[type="text"],
    .yoopxl-input[type="email"],
    .yoopxl-input[type="password"] {
        font-size: 16px !important;
        -webkit-appearance: none;
        appearance: none;
        -webkit-border-radius: 8px;
        border-radius: 8px;
    }
    
    /* تحسين الأزرار للمس */
    .yoopxl-btn,
    .yoopxl-toggle-password,
    .yoopxl-close-modal {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* تحسين النماذج */
    .yoopxl-registration-form {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .yoopxl-input {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* تحسينات للشاشات عالية الكثافة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .yoopxl-registration-container {
        border: 0.5px solid rgba(0, 0, 0, 0.1);
    }
}

/* تحسين للوضع الأفقي على الهواتف */
@media (max-height: 500px) and (orientation: landscape) {
    .yoopxl-registration-wrapper {
        align-items: flex-start !important;
        padding: 10px !important;
    }
    
    .yoopxl-registration-container {
        margin: 10px 0 !important;
        min-height: auto !important;
    }
    
    .yoopxl-registration-left {
        padding: 20px 15px !important;
    }
    
    /* الصورة الجانبية والمميزات مخفية في الوضع الأفقي لتوفير مساحة */
    .yoopxl-registration-right,
    .yoopxl-benefits {
        display: none !important;
    }
}
