/* public/css/cis-public-styles.css */

/*
  Base font-family is now handled globally by cis-fonts.css,
  which is enqueued in the main plugin file.
  This file will handle specific styling for public-facing components.
*/
/* The .cis-theme-styles class now receives font-family via cis-fonts.css */
/* .cis-theme-styles { font-family: 'Vazirmatn', Arial, sans-serif; } */ /* REMOVED - NOW HANDLED GLOBALLY */


/* Container for forms when rendered on admin pages (add new inquiry/ticket) */
.wrap.cis-admin-container .cis-main-content .cis-form-outer-container {
    /* Styles for the outer box are in PHP for add-ticket-page.php */
}

/* Ensure select height for language selector */
.cis-form-language-selector {
    height: 2.5rem; /* Tailwind h-10 */
    line-height: normal; /* Ensure text is vertically centered */
}

/* Modal Styling (ensure it's on top and centered) */
#cis-message-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(31, 41, 55, 0.75); /* bg-gray-800 bg-opacity-75 */
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem; /* px-4 for small screens */
    z-index: 99999; /* Ensure it's on top */
}

#cis-message-modal > div { /* The direct child, which is the modal content box */
    position: relative;
    padding: 1.5rem; /* p-6 */
    width: 100%;
    max-width: 28rem; /* max-w-md */
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); /* shadow-xl */
    border-radius: 0.5rem; /* rounded-lg */
    background-color: #fff; /* bg-white */
}

@media (min-width: 768px) { /* md */
    #cis-message-modal > div {
        width: 50%; /* md:w-1/2 */
    }
}
@media (min-width: 1024px) { /* lg */
    #cis-message-modal > div {
        width: 33.333333%; /* lg:w-1/3 */
    }
}

/* Style for inline field error messages */
.cis-field-error-message {
    color: #dc2626; /* text-red-600 */
    font-size: 0.75rem; /* text-xs */
    margin-top: 0.25rem; /* mt-1 */
}

/* Styling for forms rendered via shortcodes on the frontend or admin views */
.support-ticket-form-container.cis-theme-styles,
.cargo-inquiry-form-container.cis-theme-styles {
    max-width: 768px; /* md:max-w-3xl */
    margin: 2rem auto;
    background-color: #fff;
    padding: 1.5rem; /* p-6 */
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); /* shadow-md */
}
@media (min-width: 768px) { /* md breakpoint */
    .support-ticket-form-container.cis-theme-styles,
    .cargo-inquiry-form-container.cis-theme-styles {
        padding: 2rem; /* md:p-8 */
    }
}

/* New Progress Tracker Styles */
.cis-progress-tracker {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem; /* mb-8 */
    padding: 0 10%;
    position: relative;
}

.cis-progress-tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    text-align: center;
    width: auto;
    min-width: 60px;
}

.cis-progress-tracker-dot {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    margin-bottom: 0.5rem;
}

.cis-progress-tracker-step.active .cis-progress-tracker-dot {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}
.cis-progress-tracker-step.completed .cis-progress-tracker-dot {
    background-color: #34d399;
    border-color: #34d399;
    color: white;
}

.cis-progress-tracker-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
    white-space: normal;
    line-height: 1.3;
    max-width: 100px;
    text-align: center;
}

.cis-progress-tracker-step.active .cis-progress-tracker-label,
.cis-progress-tracker-step.completed .cis-progress-tracker-label {
    color: #1f2937;
    font-weight: 500;
}
.cis-progress-tracker-step.active .cis-progress-tracker-label {
    color: #4f46e5;
}

.cis-progress-tracker-line {
    flex-grow: 1;
    height: 2px;
    background-color: #e5e7eb;
    margin: 0 -1px;
    align-self: center;
    position: relative;
    top: calc(1.25rem - 1px);
    transition: background-color 0.3s ease;
    z-index: 0;
}
.cis-progress-tracker-line.active {
    background-color: #4f46e5;
}

@media (max-width: 768px) {
    .cis-progress-tracker {
        padding: 0 5%;
    }
    .cis-progress-tracker-label {
        font-size: 0.75rem;
    }
    .cis-progress-tracker-dot {
        width: 2rem;
        height: 2rem;
    }
     .cis-progress-tracker-line {
        top: calc(1rem - 1px);
    }
}

/* Form Messages Styling */
.cis-form-success-message div,
.cis-form-error-message div,
#form-messages > div,
#ticket-form-messages > div,
[id^="ticket-form-messages-"] > div,
[id^="form-messages-"] > div {
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    border-width: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cis-form-success-message div {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.cis-form-error-message div,
#form-messages > div.error,
#ticket-form-messages > div.error,
[id^="ticket-form-messages-"] > div.error,
[id^="form-messages-"] > div.error {
    color: #b91c1c;
    background-color: #fee2e2;
    border-color: #fecaca;
}

#form-messages p.text-red-600,
#ticket-form-messages p.text-red-600,
[id^="ticket-form-messages-"] p.text-red-600,
[id^="form-messages-"] p.text-red-600 {
    color: #b91c1c;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    padding: 0.75rem;
    border-radius: 0.375rem;
    text-align: center;
}

/* Default styling for cis-input class */
.cis-input {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    width: 100%;
    display: block;
    margin-top: 0.25rem;
    /* font-family is inherited from .cis-theme-styles */
}
.cis-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Form elements generic styling */
.cis-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Button styling */
.cis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* font-family is inherited from .cis-theme-styles */
}
.cis-btn-primary {
    background-color: #4f46e5;
    color: white;
}
.cis-btn-primary:hover {
    background-color: #4338ca;
}
.cis-btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}
.cis-btn-secondary:hover {
    background-color: #d1d5db;
}

/* Language selector specific styling */
.cis-form-language-selector-container {
    margin-bottom: 1rem;
}
.cis-form-container[dir="rtl"] .cis-form-language-selector-container,
.support-ticket-form-container[dir="rtl"] .cis-form-language-selector-container,
.my-support-tickets-container[dir="rtl"] .cis-form-language-selector-container {
    text-align: right;
}
.cis-form-language-selector {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #fff;
    min-width: 100px;
}

/* Multi-step form progress bar */
.cargo-inquiry-form-container .cis-progress-bar-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2rem;
}
.cargo-inquiry-form-container .cis-progress-bar-container::before {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%); height: 4px; width: 100%; background-color: #e5e7eb; z-index: 0;
}
.cargo-inquiry-form-container .cis-progress-bar {
    position: absolute; top: 50%; transform: translateY(-50%); height: 4px; background-color: #4f46e5; z-index: 1; transition: width 0.3s ease;
}
.cargo-inquiry-form-container .cis-progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
}
.cargo-inquiry-form-container .cis-progress-step {
    width: 2.5rem; height: 2.5rem; background-color: white; border: 4px solid #e5e7eb; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; color: #9ca3af;
    z-index: 2; position: relative;
}
.cargo-inquiry-form-container .cis-progress-step.active {
    border-color: #4f46e5;
    color: #4f46e5;
}
.cargo-inquiry-form-container .cis-progress-step.completed {
    border-color: #4f46e5; background-color: #4f46e5; color: white;
}
.cargo-inquiry-form-container .cis-step-label {
    position: absolute; top: 100%;
    left: 50%; transform: translateX(-50%);
    margin-top: 0.5rem; font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap; text-align: center;
    width: max-content;
    max-width: 100px;
}
.cargo-inquiry-form-container .cis-step-label.active {
    color: #4f46e5; font-weight: 600;
}

/* Styles for form messages (success/error) */
#form-messages, #ticket-form-messages, [id^="ticket-form-messages-"] {
    margin-top: 1rem;
    font-size: 0.875rem;
}
#form-messages p.cis-text-red-500,
#ticket-form-messages p.cis-text-red-500,
[id^="ticket-form-messages-"] p.cis-text-red-500 {
    color: #ef4444;
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 0.75rem;
    border-radius: 0.375rem;
}
#form-messages p.cis-text-green-500,
#ticket-form-messages p.cis-text-green-500,
[id^="ticket-form-messages-"] p.cis-text-green-500 {
    color: #10b981;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 0.75rem;
    border-radius: 0.375rem;
}

/* Styles for table in My Support Tickets */
.my-support-tickets-container .cis-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}
.my-support-tickets-container .cis-table thead {
    background-color: #f9fafb;
}
.my-support-tickets-container .cis-table th {
    padding: 0.75rem 1.5rem;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.my-support-tickets-container[dir="ltr"] .cis-table th {
    text-align: left;
}
.my-support-tickets-container .cis-table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
}
.my-support-tickets-container .cis-table tbody tr:last-child td {
    border-bottom: none;
}
.my-support-tickets-container .cis-table .font-medium { font-weight: 500; }
.my-support-tickets-container .cis-table .text-gray-900 { color: #111827; }
.my-support-tickets-container .cis-table .text-gray-500 { color: #6b7280; }

/* Pagination for My Support Tickets */
.my-support-tickets-container .pagination {
    margin-top: 1.5rem;
}
.my-support-tickets-container .pagination ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}
.my-support-tickets-container .pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #4f46e5;
    background-color: #fff;
    font-size: 0.875rem;
}
.my-support-tickets-container .pagination .page-numbers:hover,
.my-support-tickets-container .pagination .page-numbers:focus {
    background-color: #eef2ff;
    border-color: #6366f1;
}
.my-support-tickets-container .pagination .page-numbers.current {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
    font-weight: 600;
}
.my-support-tickets-container .pagination .page-numbers.dots {
    border: none;
    background-color: transparent;
    padding: 0.5rem 0.2rem;
}

/* Single Ticket View on Frontend */
.cis-single-ticket-view .prose {
    line-height: 1.6;
}
.cis-single-ticket-view .prose h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}
.cis-single-ticket-view .cis-ticket-reply .prose-sm {
    font-size: 0.875rem;
}

/* Status Badges */
.cis-status-badge {
    padding: 0.25rem 0.75rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    line-height: 1.25rem;
    text-transform: capitalize;
    white-space: nowrap;
}
.inquiry-status-draft { background-color: #f3f4f6; color: #4b5563; }
.inquiry-status-pending_approval { background-color: #fef3c7; color: #92400e; }
.inquiry-status-approved { background-color: #d1fae5; color: #065f46; }
.inquiry-status-rejected { background-color: #fee2e2; color: #991b1b; }
.inquiry-status-in_progress { background-color: #e0e7ff; color: #3730a3; }
.inquiry-status-quoted { background-color: #ccfbf1; color: #0f766e; }
.inquiry-status-accepted { background-color: #cffafe; color: #0891b2; }
.inquiry-status-completed { background-color: #dcfce7; color: #166534; }
.inquiry-status-cancelled { background-color: #e5e7eb; color: #374151; }

.ticket-status-open { background-color: #dbeafe; color: #1e40af; }
.ticket-status-pending_support { background-color: #fef9c3; color: #854d0e; }
.ticket-status-pending_user { background-color: #ffedd5; color: #c2410c; }
.ticket-status-in_progress { background-color: #e0e7ff; color: #3730a3; }
.ticket-status-on_hold { background-color: #fce7f3; color: #be185d; }
.ticket-status-resolved { background-color: #d1fae5; color: #065f46; }
.ticket-status-closed { background-color: #e5e7eb; color: #374151; }

.ticket-priority-low { background-color: #ecfdf5; color: #059669; }
.ticket-priority-medium { background-color: #eff6ff; color: #2563eb; }
.ticket-priority-high { background-color: #fffbeb; color: #d97706; }
.ticket-priority-urgent { background-color: #fef2f2; color: #dc2626; }

/* --- MODERN TAB STYLES --- */
.cis-tabs-nav-wrapper {
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #a1a1aa #f1f1f1;
}
.cis-tabs-nav-wrapper::-webkit-scrollbar { height: 4px; }
.cis-tabs-nav-wrapper::-webkit-scrollbar-track { background: #f1f1f1; }
.cis-tabs-nav-wrapper::-webkit-scrollbar-thumb { background: #a1a1aa; border-radius: 2px; }
.cis-tabs-nav { display: flex; gap: 1rem; }
[dir="rtl"] .cis-tabs-nav { gap: 1rem; }
.cis-tab-link {
    padding: 0.75rem 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.cis-tab-link:hover {
    color: #374151;
    border-color: #d1d5db;
}
.cis-tab-link.active {
    color: #4f46e5;
    border-color: #4f46e5;
}

/* Tab pane styling */
.cis-tab-pane { display: none; }
.cis-tab-pane.active { display: block; }
/* --- START: UNIFIED & REDESIGNED AUTH MODAL STYLES --- */
.cis-auth-button-container button.login-register-btn {
    background-color: #1040B2 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: normal !important;
    transition: all 0.2s ease !important;
}
.cis-auth-button-container button.login-register-btn:hover {
    background-color: #FFC400 !important;
	color: #1f2937 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cis-auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(17, 24, 39, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    overflow-y: auto;
    padding: 1rem;
}
.cis-auth-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.cis-auth-modal {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: auto;
}
.cis-auth-modal-overlay.visible .cis-auth-modal {
    transform: translateY(0) scale(1);
}

.cis-auth-modal-close {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    width: 32px !important;
    height: 32px !important;
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
    z-index: 20 !important;
}
[dir="rtl"] .cis-auth-modal-close {
    right: auto !important;
    left: 0.75rem !important;
}
.cis-auth-modal-close:hover {
    background-color: #dc2626 !important;
    color: white !important;
    transform: rotate(90deg) !important;
}
.cis-auth-modal-close svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

.cis-auth-modal-body {
    padding: 1.5rem 2rem 2rem;
}

.cis-auth-tab-pane form .cis-input {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    border-color: #d1d5db;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cis-auth-tab-pane form .cis-input:focus {
     border-color: #1040B2;
     box-shadow: 0 0 0 3px rgba(16, 64, 178, 0.2);
}
.cis-auth-tab-pane form .relative {
    position: relative;
}

.cis-auth-submit-btn {
    width: 100%;
    padding: 0.8rem 1rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    cursor: pointer;
    border: none !important;
    transition: all 0.2s ease !important;
    margin-top: 0.5rem;
    background-color: #1040B2 !important;
    color: white !important;
}
.cis-auth-submit-btn:hover {
    background-color: #FFC400 !important;
    color: #1f2937 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 196, 0, 0.3);
}
.cis-auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cis-auth-message {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-align: center;
    border-width: 1px;
    display: none;
}
.cis-auth-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
.cis-auth-message.success {
    background-color: #dcfce7;
    color: #14532d;
    border-color: #86efac;
}

.cis-user-display-loggedin {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    flex-direction: row !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.cis-user-display-loggedin * {
    line-height: 1.2 !important;
}
.cis-user-display-loggedin .cis-welcome-message {
    color: #374151 !important;
}
.cis-user-display-loggedin .cis-dashboard-link {
    color: #1040B2 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.2s;
    background: none !important;
    padding: 0 !important;
}
.cis-user-display-loggedin .cis-dashboard-link:hover {
    color: #FFC400 !important;
}
.cis-user-display-loggedin .cis-logout-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    transition: background-color 0.2s, color 0.2s;
    border: none !important;
    padding: 0 !important;
}
.cis-user-display-loggedin .cis-logout-link:hover {
    background-color: #dc2626 !important;
    color: white !important;
}
.cis-user-display-loggedin .cis-logout-link svg {
    width: 16px !important;
    height: 16px !important;
}

/* --- END: OLD AUTH MODAL STYLES --- */


/* --- START: NEW ADVANCED AUTH MODAL STYLES (2024-05-22) --- */
/* The font-family for this section is now handled by cis-fonts.css */

.cis-auth-modal .cis-modal-header {
    background: linear-gradient(135deg, #0057D9 0%, #0041a3 100%);
    padding: 40px 30px 30px;
    text-align: center;
    color: white;
}
.cis-auth-modal .cis-modal-header .logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.cis-auth-modal .cis-modal-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}
.cis-auth-modal .cis-modal-header p {
    font-size: 14px;
    opacity: 0.9;
}

.cis-auth-modal .cis-modal-tabs-wrapper {
    display: flex;
    background: #f8f9fa;
}
.cis-auth-modal .cis-modal-tabs-wrapper .tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    position: relative;
}
.cis-auth-modal .cis-modal-tabs-wrapper .tab.active {
    color: #0057D9;
    background: white;
}
.cis-auth-modal .cis-modal-tabs-wrapper .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0057D9, #FFD700);
    border-radius: 3px 3px 0 0;
}

.cis-auth-modal .form-group {
    margin-bottom: 24px;
}
.cis-auth-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}
.cis-auth-modal .form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}
.cis-auth-modal .form-group input:focus {
    outline: none;
    border-color: #0057D9;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.1);
}
.cis-auth-modal .form-group input::placeholder {
    color: #adb5bd;
}

.cis-auth-modal .submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0057D9 0%, #0041a3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.cis-auth-modal .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 87, 217, 0.3);
}
.cis-auth-modal .submit-btn:active {
    transform: translateY(0);
}

.cis-auth-modal .divider {
    text-align: center; margin: 24px 0; position: relative; color: #6c757d; font-size: 14px;
}
.cis-auth-modal .divider::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #e9ecef; z-index: 1;
}
.cis-auth-modal .divider span {
    background: white; padding: 0 16px; position: relative; z-index: 2;
}
.cis-auth-modal .social-btn {
    width: 100%; padding: 14px; border: 2px solid #e9ecef; background: white; border-radius: 12px;color:black;
    font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease;
    margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.cis-auth-modal .social-btn:hover {
    border-color: #0057D9; background: #f8f9ff;color:black;
}
.cis-auth-modal .forgot-link {
    text-align: center; margin-top: 16px;
}
.cis-auth-modal .forgot-link a {
    color: #0057D9; text-decoration: none; font-size: 14px; font-weight: 500;
}
.cis-auth-modal .terms {
    font-size: 12px; color: #6c757d; text-align: center; margin-top: 16px; line-height: 1.5;
}
.cis-auth-modal .terms a {
    color: #0057D9; text-decoration: none;
}
.cis-auth-modal .cis-auth-pane {
    display: none;
}
.cis-auth-modal .cis-auth-pane.active {
    display: block; animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); }
}

.cis-auth-modal .back-btn {
    display: flex; align-items: center; gap: 8px; color: #0057D9; font-weight: 500;
    cursor: pointer; margin-bottom: 24px; font-size: 14px; transition: all 0.3s ease; border: none; background: none;
}
.cis-auth-modal .back-btn:hover {
    color: #0041a3; transform: translateX(-4px);
}
[dir="rtl"] .cis-auth-modal .back-btn:hover {
    transform: translateX(4px);
}
.cis-auth-modal .mobile-info {
    text-align: center; margin-top: 16px;
}
.cis-auth-modal .mobile-info p {
    font-size: 14px; color: #6c757d; line-height: 1.5;
}
.cis-auth-modal .resend-section {
    text-align: center; margin-top: 20px;
}
.cis-auth-modal .resend-section p {
    font-size: 14px; color: #6c757d; margin-bottom: 8px;
}
.cis-auth-modal .resend-section a {
    color: #0057D9; text-decoration: none; font-weight: 500; font-size: 14px;
}
.cis-auth-modal .timer {
    margin-top: 12px; font-size: 16px; font-weight: 600; color: #FFD700;
    background: rgba(255, 215, 0, 0.1); padding: 8px 16px; border-radius: 8px; display: inline-block;
}
.cis-auth-modal .timer.expired {
    color: #dc3545;
}

.cis-auth-modal .form-group label span.required-star {
    color: #dc3545;
    margin-right: 2px;
}

/* --- END: NEW ADVANCED AUTH MODAL STYLES --- */

/* --- START: Responsive Auth Button Styles --- */
.cis-auth-mobile-view {
    display: none;
}

.cis-auth-mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1040B2;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cis-auth-mobile-icon:hover {
    background-color: #FFC400;
    color: #1f2937;
}

.cis-auth-mobile-icon svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    /* On mobile, hide the desktop button text */
    .cis-auth-desktop-view {
        display: none !important;
    }
    /* And show the mobile icon view */
    .cis-auth-mobile-view {
        display: block;
    }

    /* --- NEW ROBUST POSITIONING LOGIC --- */
    
    /* Step 1: Establish the header as the positioning container. */
    /* This selector targets Elementor headers in a generic way. */
    .elementor-location-header {
        position: relative !important;
    }

    /* Step 2: Absolutely position our widget's container. */
    /* This lifts it out of the normal document flow and lets us place it precisely. */
    .elementor-widget-cis-auth-button {
        position: absolute !important;
        top: 50%; /* Vertically center it */
        right: 15px; /* Position it 15px from the right edge */
        left: auto; /* Make sure it doesn't also stick to the left */
        transform: translateY(-50%); /* Fine-tune vertical alignment */
        z-index: 10; /* Ensure it's above other elements */
        width: auto !important; /* Override column constraints */
        margin: 0 !important;
    }
    
    /* Note: The old flexbox code using 'order' has been removed because it was too dependent 
       on specific Elementor element IDs. This new approach is more resilient. */
}
/* --- END: Responsive Auth Button Styles --- */

/* --- START: Responsive Fixes for Auth Modal --- */
@media (max-width: 480px) {
    .cis-auth-modal-overlay {
        padding-top: 20px;
        padding-bottom: 20px;
        align-items: flex-start;
    }

    .cis-auth-modal {
        width: 90%;
        max-width: none;
        margin: 0 auto;
    }

    .cis-auth-modal .cis-modal-header {
        padding: 25px 20px 20px;
    }

    .cis-auth-modal-body {
        padding: 1.5rem 1.5rem;
    }

    .cis-auth-modal .cis-modal-header h1 {
        font-size: 20px;
    }
    
    .cis-auth-modal .cis-modal-tabs-wrapper .tab {
        padding: 12px;
        font-size: 14px;
    }

    .cis-auth-modal .form-group {
        margin-bottom: 18px;
    }
    
    .cis-auth-modal .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .cis-auth-modal .submit-btn {
        padding: 14px;
        font-size: 15px;
        margin-bottom: 15px;
    }

    .cis-auth-modal .divider {
        margin: 20px 0;
    }
}
/* --- END: Responsive Fixes for Auth Modal --- */