/**
 * Client Integration Pro - Frontend Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Global Font Family - Applied to All Plugin Elements
   ========================================================================== */

/* Apply client's font globally to all plugin elements */
.cip-modal,
.cip-modal *,
.cip-login-button,
.cip-logout-btn,
.cip-btn-primary,
.cip-btn-secondary,
.cip-btn-otp,
.cip-input,
.cip-form-group label,
.cip-profile-dropdown-menu,
.cip-profile-dropdown-menu *,
.cip-referrals-wrapper,
.cip-referrals-wrapper *,
.cip-login-trigger,
textarea[name="cip_custom_css"],
textarea[name="cip_custom_js"] {
    font-family: 'Neulisans-light', Helvetica, Arial, Lucida, sans-serif !important;
}

/* ==========================================================================
   Login Button & Modal
   ========================================================================== */

.cip-login-button {
    display: inline-block;
    padding: 12px 24px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.cip-login-button:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cip-btn-otp {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.cip-btn-otp:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cip-btn-otp:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.cip-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

.cip-divider::before,
.cip-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e5e5;
}

.cip-divider span {
    padding: 0 15px;
}

.cip-btn-email {
    width: 100%;
    padding: 15px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.cip-btn-email:hover {
    background: #f8f8f8;
    border-color: #bbb;
    transform: translateY(-1px);
}

.cip-trouble-link {
    text-align: center;
    margin-top: 15px;
}

.cip-trouble-link a {
    color: #1a1a1a;
    text-decoration: underline;
    font-size: 13px;
    transition: color 0.2s ease;
}

.cip-trouble-link a:hover {
    color: #666;
}

/* Login Trigger (Username in Header) */
.cip-login-trigger {
    position: relative;
    font-family: 'Neulisans-light', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 1vw !important;
    color: #FFFFFF !important;
    line-height: 1.5em !important;
    font-weight: 400 !important;
    text-transform: none;
    letter-spacing: 0px;
    cursor: pointer;
}

/* Login trigger when inside menu item */
.menu-item.cip-login-trigger {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    white-space: nowrap;
}

/* Login trigger in protected section overlay */
.cip-overlay-login-btn.cip-login-trigger {
    color: #000000 !important;
}

/* Login trigger in profile dropdown */
.cip-profile-dropdown-container .cip-login-trigger {
    font-weight: 700;
}

/* Logout Button - Transparent styling for use anywhere */
.cip-logout-btn {
    padding: 0 !important;
    background: transparent !important;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    border: none;
    cursor: pointer;
}

.cip-logout-btn:hover {
    opacity: 0.8;
    color: inherit;
}

/* Logout button in dropdown menu */
.cip-dropdown-link.cip-logout-btn {
    padding: 12px 16px !important;
}

/* Profile Dropdown Container - Transparent wrapper that preserves Divi menu styling */
.cip-profile-dropdown-container {
    position: relative;
    display: contents;
    /* Use contents to make container transparent to Divi styling */
}

/* Fallback for browsers that don't support display: contents */
@supports not (display: contents) {
    .cip-profile-dropdown-container {
        display: inline-block;
        margin: 0;
        padding: 0;
        border: none;
        background: none;
        font: inherit;
        color: inherit;
        text-align: inherit;
    }
}

/* Dropdown Menu - Hidden by default, positioned relative to .cip-login-trigger */
.cip-profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: #1D1D1D !important;
    border-radius: 0px !important;
    border-top: 3px solid #F58220 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Show dropdown when hovering over login trigger, container, or dropdown itself */
.cip-profile-dropdown-container:hover .cip-profile-dropdown-menu,
.cip-login-trigger:hover+.cip-profile-dropdown-menu,
.cip-profile-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Links */
.cip-dropdown-link,
.cip-dropdown-points {
    display: block;
    padding: 12px 16px;
    color: #FFFFFF !important;
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: none;
    text-align: left;
    font-family: 'Neulisans-light', Helvetica, Arial, Lucida, sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 1.5em !important;
}

.cip-dropdown-link:last-child,
.cip-dropdown-points:last-child {
    border-bottom: none;
}

.cip-dropdown-link:hover,
.cip-profile-link:hover {
    background: #2A2A2A !important;
}

.cip-dropdown-points {
    cursor: default;
    background: #1D1D1D !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #F58220 !important;
}

/* Navbar Points Display */
.cip-navbar-points {
    color: #F58220 !important;
    font-weight: 600 !important;
}

/* Navbar Separator (pipe character) */
.cip-navbar-separator {
    color: #F58220 !important;
    font-weight: 400 !important;
    margin: 0 6px !important;
    display: inline-block;
}

/* Highlight user name and points in navbar */
.cip-login-trigger.menu-item-has-children>a .cip-user-name,
.cip-login-trigger.menu-item-has-children>a .cip-navbar-points {
    color: #F58220 !important;
    font-weight: 600 !important;
}

/* Prevent navbar text from wrapping */
.cip-login-trigger.menu-item-has-children>a {
    white-space: nowrap !important;
    overflow: visible !important;
}

/* Ensure dropdown inherits WordPress .sub-menu styles */
.cip-login-trigger.menu-item-has-children .sub-menu {
    flex-direction: column;
    display: flex;
}

/* Desktop: Hover behavior for profile dropdown (like WordPress submenus) */
@media (min-width: 981px) {
    .cip-login-trigger.menu-item-has-children:hover>.sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cip-profile-dropdown-menu {
        right: auto;
        left: 0;
    }

    .cip-member-first-name {
        padding: 10px 18px;
        font-size: 14px;
    }
}

/* Modal Overlay */
.cip-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    overflow-y: auto;
}

.cip-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    padding: 40px 50px;
    border-radius: 16px !important;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.cip-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding-right: 5px;
}

.cip-modal-body::-webkit-scrollbar {
    width: 6px;
}

.cip-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cip-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.cip-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.cip-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 38px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.cip-modal-close:hover {
    color: #333;
}

.cip-login-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.cip-form-group {
    margin-bottom: 12px;
}

.cip-form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.cip-phone-input-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    height: 52px;
}

.cip-phone-input-wrapper:focus-within {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.08);
}

.cip-country-code {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    background: #fafafa;
    border-right: 1px solid #e0e0e0;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    min-width: 70px;
}

.cip-flag {
    width: 22px;
    height: 16px;
    display: block;
    border-radius: 2px;
}

.cip-code {
    color: #333;
    font-weight: 400;
}

.cip-phone-input {
    flex: 1;
    border: none !important;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    box-shadow: none !important;
    background: #fff;
    color: #1a1a1a;
}

.cip-phone-input:focus {
    border: none;
    outline: none;
}

.cip-phone-input::placeholder {
    color: #999;
}

.cip-terms-group {
    margin: 18px 0 20px 0;
}

.cip-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.cip-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #1a1a1a;
}

.cip-checkbox-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.cip-terms-link {
    color: #ff8c42;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cip-terms-link:hover {
    color: #ff6b1a;
    text-decoration: underline;
}

.cip-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cip-form-group.error input {
    border-color: #d63638;
}

.cip-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cip-input:focus {
    outline: none;
    border-color: #0073aa;
}

.cip-field-error {
    display: block;
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
}

.cip-error-message {
    background: #fef2f2;
    border-left: 4px solid #d63638;
    padding: 12px 15px;
    margin-bottom: 15px;
    color: #b32d2e;
    border-radius: 4px;
    font-size: 14px;
    display: none;
    /* Hidden by default */
}

.cip-error-message:not(:empty) {
    display: block;
    /* Show only when has content */
}

.cip-form-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.cip-form-message.success {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.cip-form-message.error {
    background: #fef2f2;
    border-left: 4px solid #d63638;
    color: #b32d2e;
}

/* Buttons */
.cip-btn-primary {
    width: fit-content;
    padding: 13px 40px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1vw;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    align-items: center;
    border-radius: 50px;
    line-height: 1.7em;
    border: 1px solid;
}

.cip-btn-primary:hover:not(:disabled) {
    color: #1D1D1D !important;
    background-color: #F58220;
    font-weight: 500;
}

.cip-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cip-btn-secondary {
    width: fit-content;
    margin-top: 15px;
    padding: 13px 40px;
    background: #fff;
    color: #1D1D1D;
    font-size: 1vw;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
    border: none;
    font-weight: 500;
    line-height: 1.7em;
    border: 1px solid;
}

.cip-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-weight: 500;
}

.cip-submit-btn {
    width: fit-content;
    padding: 13px 40px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 1vw;
    line-height: 1.7em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 1px solid;
}

.cip-submit-btn:hover:not(:disabled) {
    color: #1D1D1D !important;
    background-color: #F58220;
    font-weight: 500;
}

.cip-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal Steps */
.cip-modal-step {
    display: none;
}

.cip-modal-step.active {
    display: block;
}

/* ==========================================================================
   Profile Page
   ========================================================================== */

.cip-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cip-profile-header {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.cip-profile-header h2 {
    margin: 0 0 10px 0;
    color: #333;
}

.cip-profile-actions {
    margin-top: 15px;
}

.cip-member-info {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.cip-member-info h3 {
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cip-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.cip-info-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 4px;
}

.cip-info-label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.cip-info-value {
    display: block;
    color: #333;
    font-size: 15px;
}

/* Loyalty Points Cards */
.cip-points-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cip-point-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cip-point-card.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cip-point-card.redeemed {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.cip-point-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    opacity: 0.9;
}

.cip-point-value {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
}

.cip-point-label {
    font-size: 13px;
    opacity: 0.85;
}

/* Tables */
.cip-table-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.cip-table-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cip-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.cip-table thead {
    background: #f9fafb;
}

.cip-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #ddd;
    font-size: 14px;
}

.cip-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px;
}

.cip-table tbody tr:hover {
    background: #f9fafb;
}

.cip-no-data {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* Session Info */
.cip-session-info {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* ==========================================================================
   Lead Form
   ========================================================================== */

.cip-lead-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#cip-lead-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#cip-lead-form h2 {
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.cip-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cip-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes cip-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .cip-modal-content {
        width: 95%;
        max-width: 95% !important;
        margin: 20px auto;
        padding: 25px 20px;
    }

    .cip-info-grid {
        grid-template-columns: 1fr;
    }

    .cip-points-cards {
        grid-template-columns: 1fr;
    }

    .cip-table {
        font-size: 13px;
    }

    .cip-table th,
    .cip-table td {
        padding: 8px 10px;
    }

    .cip-profile-container {
        padding: 10px;
    }

    /* Signup form specific adjustments */
    .cip-modal-header h2 {
        font-size: 20px;
    }

    .cip-modal-header p {
        font-size: 13px;
    }

    .cip-form-group {
        margin-bottom: 12px;
    }

    .cip-form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .cip-form-group input,
    .cip-form-group select {
        font-size: 15px;
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {

    .cip-login-button,
    .cip-logout-btn {
        width: 100%;
        text-align: center;
    }

    .cip-point-card {
        padding: 20px;
    }

    .cip-point-value {
        font-size: 28px;
    }

    /* Signup form mobile optimization */
    .cip-modal-content {
        width: 100%;
        max-width: 100% !important;
        margin: 10px auto;
        padding: 20px 15px;
        border-radius: 12px !important;
        max-height: 95vh;
    }

    .cip-modal-header h2 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .cip-modal-header p {
        font-size: 12px;
        line-height: 1.4;
    }

    .cip-form-group {
        margin-bottom: 10px;
    }

    .cip-form-group label {
        font-size: 13px;
        margin-bottom: 5px;
        display: block;
    }

    .cip-form-group input,
    .cip-form-group select {
        font-size: 14px;
        padding: 11px 12px;
        height: auto;
        min-height: 44px;
        /* Touch-friendly */
    }

    .cip-button-primary,
    .cip-button-secondary {
        font-size: 1vw !important;
        padding: 13px !important;
        min-height: 48px;
        /* Touch-friendly */
    }

    .cip-modal-close {
        font-size: 24px;
        top: 10px;
        right: 15px;
    }
}

/* ==========================================================================
   Header Profile Widget & Dropdown
   ========================================================================== */

/* Hide logged-in only elements by default */
.cip-logged-in-only {
    display: none !important;
}

/* Show when body has logged-in class */
body.cip-user-logged-in .cip-logged-in-only {
    display: block !important;
}

/* ==========================================================================
   Member Data Display (Divi Integration)
   ========================================================================== */

/* Hide logged-in content by default */
.logged-in-only,
[data-show-when="logged-in"] {
    display: none !important;
}

/* Show logged-out content by default */
.logged-out-only,
[data-show-when="logged-out"] {
    display: block !important;
}

/* Hide membership-specific content by default */
[data-show-when="membership-type"] {
    display: none !important;
}

/* When JavaScript enables them, they'll be shown inline */
.logged-in-only[style*="display: block"],
.logged-in-only[style*="display: inline"],
[data-show-when="logged-in"][style*="display: block"],
[data-show-when="logged-in"][style*="display: inline"] {
    display: block !important;
}

/* ========================================
   PROFILE DROPDOWN (New Implementation)
   ======================================== */

.cip-dropdown-arrow {
    margin-left: 0;
}

.cip-profile-dropdown {
    right: 0;
    min-width: 180px;
}

@media (max-width: 768px) {
    .menu-item.cip-login-trigger {
        font-size: 14px !important;
    }
}

/* ==========================================================================
   Protected Section Overlay
   ========================================================================== */

.cip-protected-section {
    position: relative;
}

/* Protected sections are hidden via JavaScript when user is not logged in */

/* ==========================================================================
   Signup Form Styles
   ========================================================================== */

#cip-signup-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}

/* Two-column grid for signup form on larger screens */
#cip-signup-form .cip-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

/* Full width for buttons and messages */
#cip-signup-form .cip-form-fields>div:last-child,
#cip-signup-error,
#cip-signup-success,
#cip-signup-submit-btn,
#cip-signup-back-btn {
    grid-column: 1 / -1;
}

.cip-form-group {
    margin-bottom: 0;
}

.cip-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 1vw;
}

.cip-form-group .cip-input {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 1vw;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cip-form-group .cip-input:focus {
    outline: none;
    border-color: #1D1D1D;
    box-shadow: 0 0 0 2px rgba(29, 29, 29, 0.1);
}

.cip-form-group select.cip-input {
    background: white;
    cursor: pointer;
}

.cip-button-primary {
    background: #1D1D1D;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;

}

.cip-button-primary:hover:not(:disabled) {
    background: #000;
}

.cip-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cip-button-secondary {
    background: transparent;
    color: #1D1D1D;
    border: 2px solid #1D1D1D;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cip-button-secondary:hover {
    background: #1D1D1D;
    color: #fff;
}

.cip-success-message {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

@media (max-width: 768px) {
    #cip-signup-modal-overlay {
        padding: 10px;
    }

    .cip-modal-content {
        max-width: 100% !important;
    }

    /* Single column on tablets and mobile */
    #cip-signup-form .cip-form-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Mobile landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .cip-modal-content {
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .cip-modal-body {
        max-height: calc(90vh - 100px);
        overflow-y: auto;
    }
}

/* Very small devices (320px - 360px) */
@media (max-width: 360px) {
    .cip-modal-content {
        padding: 15px 12px;
        margin: 5px auto;
        max-height: 98vh;
    }

    .cip-modal-header h2 {
        font-size: 16px;
    }

    .cip-modal-header p {
        font-size: 11px;
    }

    .cip-form-group {
        margin-bottom: 8px;
    }

    .cip-form-group label {
        font-size: 12px;
    }

    .cip-form-group input,
    .cip-form-group select {
        font-size: 13px;
        padding: 10px;
    }
}

/* ==========================================================================
   Protected Section Overlay Customization
   ========================================================================== */

.cip-overlay-content h3 {
    color: #ffffff;
}

/* ==========================================================================
   Responsive Adjustments (Continued)
   ========================================================================== */

@media (max-width: 768px) {

    .cip-form-group {
        margin-bottom: 12px;
    }

    .cip-form-group label {
        font-size: 13px;
    }

    .cip-form-group .cip-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* ==========================================================================
   Lead Referral Modal
   ========================================================================== */

#cip-lead-modal .cip-modal-content {
    max-width: 600px;
    width: 90%;
}

.cip-modal-medium {
    max-width: 600px;
}

.cip-lead-modal-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
    text-align: center;
}

.cip-lead-modal-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
    text-align: center;
}

.cip-lead-modal-form {
    width: 100%;
}

.cip-lead-modal-form .cip-form-row {
    margin-bottom: 18px;
}

.cip-lead-modal-form .cip-form-group {
    margin-bottom: 0;
}

.cip-lead-modal-form .cip-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.cip-lead-modal-form .cip-required {
    color: #e74c3c;
    margin-left: 2px;
}

.cip-mobile-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cip-mobile-input-wrapper:focus-within {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.cip-mobile-input-wrapper .cip-country-code {
    padding: 0 12px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    height: 48px;
}

.cip-mobile-input-wrapper .cip-input {
    border: none;
    border-radius: 0;
    flex: 1;
}

.cip-mobile-input-wrapper .cip-input:focus {
    border: none;
    box-shadow: none;
}

.cip-lead-modal-form .cip-input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    color: #666;
}

.cip-field-error .cip-input,
.cip-field-error .cip-mobile-input-wrapper {
    border-color: #e74c3c;
}

.cip-field-error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
}

.cip-btn-full-width {
    width: fit-content;
}

#cip-lead-modal-submit-btn {
    font-weight: 500;
}

#cip-lead-modal-success,
#cip-lead-modal-error {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

#cip-lead-modal-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#cip-lead-modal-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#cip-lead-modal-loading {
    text-align: center;
    padding: 40px 20px;
}

/* Property Cards - Add cursor pointer */
.property-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.cip-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #333;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 15px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
}

.cip-toast-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cip-toast-success {
    background: #28a745;
    color: #fff;
}

.cip-toast-warning {
    background: #ffc107;
    color: #333;
}

.cip-toast-error {
    background: #dc3545;
    color: #fff;
}

.cip-toast-icon {
    display: inline-block;
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Modal Open - Prevent Body Scroll */
body.cip-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Responsive Adjustments for Lead Modal
   ========================================================================== */

@media (max-width: 768px) {
    #cip-lead-modal .cip-modal-content {
        width: 95%;
        max-width: none;
    }

    .cip-lead-modal-title {
        font-size: 24px;
    }

    .cip-lead-modal-subtitle {
        font-size: 14px;
    }

    .cip-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        font-size: 14px;
    }
}