/* ==========================================
   MODAL STYLES - KYNE
   ========================================== */

@import url("variables.css");

/* ==========================================
   MODAL STYLES
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* .modal-content.modal-dropdown-open {
    overflow: visible;
} */

/* Webkit scrollbar styling to prevent border-radius clipping */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 0 12px 12px 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--bg, white);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 25px;
    padding-bottom: 5px;
}

/* View modal specific body padding */
.view-modal .modal-body {
    padding: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    z-index: 20;
    background-color: var(--bg, white);
}

/* Non-modal modal-actions (for pages, not modals) */
.container .modal-actions,
.container-fluid .modal-actions {
    border-top: none;
    padding: 0;
    position: static;
    margin-top: 2rem;
}

/* Ensure modal modal-actions keep their styling */
.modal-overlay .modal-actions {
    border-top: 1px solid var(--border-color);
    padding: 20px 25px;
    position: sticky;
    bottom: 0;
}

/* View modal actions specific styling */
.view-modal .modal-actions {
    padding: 20px 25px;
    margin-top: 0;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
}

/* ==========================================
   FORM STYLES FOR MODAL
   ========================================== */

.modal-form-group {
    margin-bottom: 20px;
    min-width: 0;
    max-width: 100%;
}

.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* Make asterisks red in modal form labels */
.required-asterisk {
    color: #ef4444;
    font-weight: 600;
}

.modal-form-input,
.modal-form-textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modal-form-input:focus,
.modal-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.1);
}

.modal-form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form hint styling */
.form-hint {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
}

.form-hint i {
    margin-right: 4px;
    font-size: 11px;
}

/* Date input styling for modal forms */
.modal-form-input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.modal-form-input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

.modal-form-input[type="date"]::-ms-clear,
.modal-form-input[type="date"]::-ms-reveal {
    display: none;
}

/* Input with icon styles */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-color);
    font-size: 14px;
    z-index: 2;
    pointer-events: none;
}

.input-with-icon .input-icon.currency-symbol {
    font-weight: 600;
}

.input-with-icon .modal-form-input {
    padding-left: 42px;
}

.input-with-icon .modal-form-input:focus + .input-icon,
.input-with-icon .input-icon:hover {
    color: var(--primary-color);
}

/* No icon padding variant - for date fields without icons */
.input-with-icon.no-icon-padding .modal-form-input {
    padding-left: 12px;
}

/* Password toggle eye icon styling for modal */
.input-with-icon .password-toggle {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    z-index: 3;
    transition: color 0.3s ease;
}

.input-with-icon .password-toggle:hover {
    color: var(--primary-color);
}

.modal-btn-primary,
.modal-btn-secondary,
.modal-btn-danger,
.modal-btn-success {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.modal-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.modal-btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(112, 123, 229, 0.3);
}

.modal-btn-secondary {
    background-color: var(--modal-secondary-bg, #f3f4f6);
    color: var(--modal-secondary-text, #1f2937);
    border: 1px solid var(--modal-secondary-border, #cbd5f5);
}

.modal-btn-secondary:hover,
.modal-btn-secondary:focus-visible {
    background-color: var(--modal-secondary-bg-hover, #e5e7eb);
    color: var(--modal-secondary-text-hover, #111827);
    border-color: var(--modal-secondary-border-hover, #94a3b8);
    transform: translateY(-1px);
}

.modal-btn-danger {
    background-color: #dc2626;
    color: white;
}

.modal-btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Hide remove button by default, show when active */
#removeProfileImage {
    display: none;
}

#removeProfileImage.active {
    display: inline-flex;
}

.modal-btn-success {
    background-color: #16a34a;
    color: white;
}

.modal-btn-success:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* Button error states for dropdowns */
.modal-btn-primary.error,
.modal-btn-secondary.error {
    border: 1px solid #ef4444;
    box-shadow: 0 0 0 1px #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #ef4444;
}

/* ==========================================
   PHONE CODE DROPDOWN OVERRIDES FOR MODAL
   ========================================== */

/* Modal context phone code styles */
.phone-code-modal {
    position: relative;
}

.phone-code-modal .phone-code-button,
.phone-code-modal-button {
    /* Make phone code button compact inside modals */
    width: 100%;
    min-width: 110px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: var(--text-dark);
}

.phone-code-modal .phone-code-button:focus,
.phone-code-modal-button:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.1);
}

.phone-code-modal .phone-code-button:hover,
.phone-code-modal-button:hover {
    border-color: var(--primary-color);
}

/* Modal phone code dropdown */
.phone-code-modal-dropdown,
.modal-overlay .phone-code-modal .phone-code-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200%;
    z-index: 1000;
    overflow: hidden;
}

.phone-code-modal .phone-code-search,
.modal-overlay .phone-code-modal .phone-code-search {
    border-bottom: 1px solid var(--border-color);
    background: white;
    padding: 8px 12px;
}

.phone-code-modal .phone-code-search-input,
.modal-overlay .phone-code-modal .phone-code-search-input {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    padding: 8px 12px;
}

.phone-code-modal .phone-code-search-input:focus,
.modal-overlay .phone-code-modal .phone-code-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(112, 123, 229, 0.1);
}

.phone-code-modal .phone-code-list {
    max-height: 200px;
}

.phone-code-modal .phone-code-item,
.modal-overlay .phone-code-modal .phone-code-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
    font-size: 13px;
}

.phone-code-modal .phone-code-item:hover,
.modal-overlay .phone-code-modal .phone-code-item:hover {
    background-color: var(--bg-light);
}

.phone-code-modal .phone-code-item:last-child,
.modal-overlay .phone-code-modal .phone-code-item:last-child {
    border-bottom: none;
}

/* Override phone code button to match modal form inputs */
.modal-overlay .phone-code-button {
    /* Make phone code button compact inside modals */
    width: auto;
    min-width: 110px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: var(--text-dark);
}

.modal-overlay .phone-code-button:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.1);
}

.modal-overlay .phone-code-button:hover {
    border-color: var(--primary-color);
}

/* Override phone code dropdown for modal */
.modal-overlay .phone-code-dropdown {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 100%;
}

.modal-overlay .phone-code-search {
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.modal-overlay .phone-code-search-input {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.modal-overlay .phone-code-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(112, 123, 229, 0.1);
}

.modal-overlay .phone-code-list {
    max-height: 200px;
}

.modal-overlay .phone-code-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.modal-overlay .phone-code-item:hover {
    background-color: var(--bg-light);
}

.modal-overlay .phone-code-item:last-child {
    border-bottom: none;
}

/* When a modal form row contains a phone-code, make first column compact */
.modal-form-row.has-phone-code {
    grid-template-columns: 120px 1fr;
}

/* Toggle switch styles */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e5e7eb;
    transition: 0.2s;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

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

.toggle-label {
    font-size: 14px;
    color: var(--text-dark);
}

/* Alert styles for modal messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.alert strong {
    font-weight: 600;
}

/* Error field highlighting */
.modal-form-input.error,
.modal-form-textarea.error,
.phone-code-modal-button.error,
.phone-code-button.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* Error container styling */
#userError {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #dc2626;
    display: none;
}

#userError.show {
    display: block;
}

/* Error list styling */
#userError ul,
#userError ol {
    margin: 8px 0;
    padding-left: 20px;
}

#userError li {
    margin: 4px 0;
}

/* ==========================================
   VIEW USER MODAL STYLES
   ========================================== */

/* Role and Status Badges in Modal Context */
.modal-overlay .role-badge,
.modal-overlay .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-overlay .role-badge.super-admin {
    background-color: #fef3c7;
    color: #d97706;
}

.modal-overlay .role-badge.store-admin {
    background-color: #dbeafe;
    color: #2563eb;
}

.modal-overlay .role-badge.stylist {
    background-color: #fce7f3;
    color: #db2777;
}

.modal-overlay .role-badge.customer {
    background-color: #f3f4f6;
    color: #6b7280;
}

.modal-overlay .status-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.modal-overlay .status-badge.inactive {
    background-color: #fee2e2;
    color: #dc2626;
}

.modal-overlay .status-badge.banned {
    background-color: #fef3c7;
    color: #d97706;
}

.modal-overlay .status-badge.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.modal-overlay .status-badge.status-confirmed {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.modal-overlay .status-badge.status-progress {
    background-color: #cce5ff;
    color: #004085;
    border-color: #b3d7ff;
}

.modal-overlay .status-badge.status-completed {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.modal-overlay .status-badge.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.modal-overlay .status-badge.status-no-show {
    background-color: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
}

/* Payment Status Colors */
.modal-overlay .status-badge.status-unpaid {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.modal-overlay .status-badge.status-partial {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.modal-overlay .status-badge.status-paid {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.modal-overlay .status-badge.status-refunded {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Store Tags for Gift Card Modal */
.store-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.store-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #e0f2fe;
    color: #0369a1;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bae6fd;
    transition: all 0.2s ease;
}

.store-tag:hover {
    background-color: #bae6fd;
    border-color: #7dd3fc;
    transform: translateY(-1px);
}

/* Large modal variant */
.modal-large {
    max-width: 900px;
    width: 95%;
}

/* User Profile Header */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    color: white;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-large .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-summary {
    flex: 1;
}

.user-info-summary .user-full-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: white;
}

.user-info-summary .user-email {
    font-size: 16px;
    margin: 0 0 12px 0;
    opacity: 0.9;
}

.user-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-badges .role-badge,
.user-badges .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Booking Header Card */
.booking-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    color: #fff;
}

.booking-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.booking-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.booking-header-info .booking-number {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.status-badge-group {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.booking-header-meta {
    display: flex;
    gap: 24px;
    align-items: center;
}

.booking-header-meta label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.8);
}

.booking-header-meta p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Modal badges with refined styling */
.modal-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.modal-badge-primary {
    background-color: #eff6ff;
    color: #0369a1;
    border-color: #bae6fd;
}

.modal-badge-success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.modal-badge-warning {
    background-color: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

.modal-badge-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.modal-badge-info {
    background-color: #ecf0ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.modal-badge-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

/* User Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 15px;
    padding: 10px;
}

.details-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.details-section.full-width-section {
    grid-column: 1 / -1;
}

.modal-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title i {
    color: var(--primary-color);
    width: 18px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    word-break: break-word;
}

/* Address Display */
.address-display {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.address-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.address-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    word-break: break-word;
}

.address-full {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.address-full .address-label {
    margin-bottom: 4px;
    display: block;
}

.address-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
    white-space: pre-line;
    font-weight: 500;
}

/* Activity Stats */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.modal-stat-item {
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.modal-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.modal-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Text color utilities for view modal */
.text-success {
    color: #16a34a !important;
}

.text-danger {
    color: #dc2626 !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-info {
    color: #2563eb !important;
}

/* Responsive adjustments for view modal */
@media (max-width: 768px) {
    .modal-large {
        width: 98%;
        max-width: none;
    }

    .user-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px;
    }

    .user-avatar-large {
        width: 60px;
        height: 60px;
    }

    .user-info-summary .user-full-name {
        font-size: 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .activity-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .address-components {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .activity-stats {
        grid-template-columns: 1fr;
    }

    .user-badges {
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn-primary,
    .modal-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .user-badges {
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-btn-primary,
    .modal-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .address-components {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .store-tags-container {
        gap: 6px;
    }

    .store-tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* Modal-specific dropdown label styling */
.modal-content .reusable-dropdown-label {
    margin-bottom: 6px;
}

/* ==========================================
   RADIO BUTTON STYLES
   ========================================== */

.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:hover {
    border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.1);
}

.radio-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: white;
}

.radio-option input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.2);
}

.radio-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
}

.radio-option:hover .radio-label {
    color: var(--primary-color);
}

/* ==========================================
   STORE ADMIN MANAGEMENT STYLES
   ========================================== */

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.modal-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   STORE SERVICES STYLES
   ========================================== */

.service-input-container {
    margin-bottom: 16px;
}

.service-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Add left padding for service inputs with icons */
.input-with-icon .service-input {
    padding-left: 42px;
}

.service-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 123, 229, 0.1);
}

.service-input::placeholder {
    color: #9ca3af;
}

/* Textarea specific styles */
.service-input[rows] {
    resize: vertical;
    min-height: 80px;
}

.add-service-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.add-service-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(112, 123, 229, 0.3);
}

.add-service-btn:active {
    transform: translateY(0);
}

.services-table-container {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.services-table thead {
    background-color: var(--bg-light);
}

.services-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.services-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.services-table tbody tr:hover {
    background-color: var(--bg-light);
}

.services-table tbody tr:last-child {
    border-bottom: none;
}

.services-table tbody td {
    padding: 12px 16px;
    color: var(--text-dark);
}

.remove-service-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background-color: #fee2e2;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.remove-service-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* Service Image Thumbnail in Table */
.service-image-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* ==========================================
   VIEW STORE MODAL ENHANCEMENTS
   ========================================== */

/* Admin and Staff Lists */
.admin-list,
.staff-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-item,
.staff-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.admin-name,
.staff-name {
    font-weight: 500;
    color: var(--text-dark);
}

.admin-email,
.staff-email {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Services Table in View Modal */
.services-table-container {
    overflow-x: auto;
    margin-top: 12px;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.services-table th,
.services-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.services-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.services-table tbody tr:hover {
    background-color: var(--bg-light);
}

/* Section Header Primary Styling - Reusable */
.section-header-primary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    color: white !important;
    padding: 16px 20px !important;
    border-radius: 12px;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 20px rgba(112, 123, 229, 0.25);
    border: none !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    position: relative;
    overflow: hidden;
    animation: sectionHeaderGlow 2s ease-in-out infinite alternate;
}

@keyframes sectionHeaderGlow {
    0% {
        box-shadow: 0 4px 20px rgba(112, 123, 229, 0.25);
    }

    100% {
        box-shadow:
            0 4px 25px rgba(112, 123, 229, 0.35),
            0 0 30px rgba(112, 123, 229, 0.1);
    }
}

.section-header-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.15)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.15)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.15)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.section-header-primary i {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 18px !important;
    margin-right: 12px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.section-header-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(112, 123, 229, 0.4),
        0 0 40px rgba(112, 123, 229, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Responsive adjustments for services */
@media (max-width: 768px) {
    .section-header-primary {
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 14px 16px !important;
        font-size: 15px !important;
    }

    .services-table {
        font-size: 13px;
    }

    .services-table thead th,
    .services-table tbody td {
        padding: 10px 12px;
    }

    /* Add horizontal scroll for services table on smaller screens */
    .services-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .services-table {
        min-width: 600px;
        /* Ensure table doesn't shrink too much */
        white-space: nowrap;
    }
}

/* Timeline Container Styles */
.timeline-container {
    position: relative;
    padding: 0 0 0 27px;
}

.timeline-container::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), #e5e7eb);
}

.timeline-item {
    display: flex;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
    background: white;
    z-index: 2;
}

.timeline-marker.completed {
    background-color: #16a34a;
    box-shadow: 0 0 0 2px #dcfce7;
}

.timeline-marker.pending {
    background-color: #f59e0b;
    box-shadow: 0 0 0 2px #fef3c7;
}

.timeline-marker.failed {
    background-color: #dc2626;
    box-shadow: 0 0 0 2px #fee2e2;
}

.timeline-content {
    padding: 12px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    flex: 1;
}

.timeline-item:has(.timeline-marker.completed) .timeline-content {
    border-left-color: #16a34a;
    background: #f0fdf4;
}

.timeline-item:has(.timeline-marker.pending) .timeline-content {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.timeline-item:has(.timeline-marker.failed) .timeline-content {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.timeline-date {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin: 0;
}

/* ==========================================
   DISPUTE TYPE AND PRIORITY LABEL STYLES
   ========================================== */

/* Label styling for dispute type and priority */
.detail-label-dispute-type,
.detail-label-priority {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 8px;
    margin-top: 12px;
}

.detail-label-dispute-type::before {
    content: "⚖️ ";
    margin-right: 4px;
}

.detail-label-priority::before {
    content: "🔔 ";
    margin-right: 4px;
}

/* Enhanced detail value styling for dispute types and priority */
.detail-value-dispute-type,
.detail-value-priority {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Dispute Type badge colors */
.detail-value-dispute-type {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.detail-value-dispute-type.payment_issue {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.detail-value-dispute-type.service_quality {
    background-color: #fef3c7;
    color: #78350f;
    border: 1px solid #fde68a;
}

.detail-value-dispute-type.cancellation {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

.detail-value-dispute-type.refund_related {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.detail-value-dispute-type.commission_dispute {
    background-color: #cffafe;
    color: #164e63;
    border: 1px solid #a5f3fc;
}

.detail-value-dispute-type.other {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Priority badge colors */
.detail-value-priority {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.detail-value-priority.low {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.detail-value-priority.medium {
    background-color: #fef3c7;
    color: #78350f;
    border: 1px solid #fde68a;
}

.detail-value-priority.high {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.detail-value-priority.urgent {
    background-color: #fce7f3;
    color: #831843;
    border: 1px solid #fbcfe8;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

/* ==========================================
   DISPUTE SUMMARY CARD STYLES
   ========================================== */

.dispute-summary-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dispute-summary-card > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.dispute-summary-card > div > div {
    display: flex;
    flex-direction: column;
}

.dispute-summary-card label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.dispute-summary-card p {
    margin: 0;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

@media (max-width: 768px) {
    .dispute-summary-card > div {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ==========================================
   PERMISSION MODULE STYLES
   ========================================== */
.permission-module {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.permission-group-header {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.permission-group-header:hover {
    background: linear-gradient(to right, #e9ecef, #dee2e6);
}

.permission-group-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-group-header .toggle-icon {
    transition: transform 0.3s;
    color: #6c757d;
}

.permission-group-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.permission-list {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 12px;
}

.permission-list.collapsed {
    display: none;
}

.permission-checkbox {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.permission-checkbox:hover {
    background: #f8f9fa;
}

.permission-checkbox input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-checkbox label {
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.permission-checkbox .permission-name {
    font-weight: 500;
    color: #212529;
    display: block;
    margin-bottom: 3px;
}

.permission-checkbox .permission-description {
    font-size: 12px;
    color: #6c757d;
    display: block;
    line-height: 1.4;
}

.permission-count {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .permission-list {
        grid-template-columns: 1fr;
    }
}

/* Profile Picture Upload Component */

.profile-image-upload-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: var(--form-input-border-radius);
    border: 1px solid var(--border-color);
}

.profile-image-preview-container {
    position: relative;
    flex-shrink: 0;
}

.profile-image-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(112, 123, 229, 0.2);
    border-color: var(--primary-color);
}

.profile-image-preview img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-preview img.active {
    display: block;
}

.profile-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    gap: 4px;
}

.profile-image-placeholder.hidden {
    display: none;
}

.profile-image-placeholder i {
    font-size: 40px;
    opacity: 0.95;
}

.profile-image-placeholder .placeholder-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border-radius: 50%;
}

.profile-image-preview:hover .profile-image-overlay {
    display: flex;
}

.profile-image-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* NEW: Horizontal Button Alignment */
.profile-image-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-image-buttons .modal-btn-primary,
.profile-image-buttons .modal-btn-danger {
    height: 41.6px;
    /* Match modal action button height */
    min-width: 41.6px;
    /* Ensure square aspect ratio for icon buttons */
}

.btn-upload-profile,
.btn-remove-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--form-input-border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: fit-content;
}

.btn-upload-profile {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(112, 123, 229, 0.2);
}

.btn-upload-profile:hover {
    background-color: var(--primary-dark);
    transform: var(--button-hover-transform);
    box-shadow: var(--button-hover-shadow);
}

.btn-upload-profile:active {
    transform: translateY(0);
}

.btn-remove-profile {
    background-color: white;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    display: none;
}

.btn-remove-profile.active {
    display: inline-flex;
}

.btn-remove-profile:hover {
    background-color: var(--danger-color);
    color: white;
    transform: var(--button-hover-transform);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.upload-requirements {
    margin-top: 2px;
}

.upload-requirements small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 12px;
    font-weight: 500;
}

.upload-requirements i {
    color: var(--primary-color);
    font-size: 11px;
}

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

@media (max-width: 576px) {
    .profile-image-upload-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image-controls {
        width: 100%;
        align-items: center;
    }

    .profile-image-buttons {
        justify-content: center;
        width: 100%;
    }

    .btn-upload-profile,
    .btn-remove-profile {
        width: 100%;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.btn-upload-profile:focus-visible,
.btn-remove-profile:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Ensure proper contrast for placeholder text */
@media (prefers-contrast: high) {
    .profile-image-placeholder {
        font-weight: 700;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .profile-image-preview,
    .btn-upload-profile,
    .btn-remove-profile,
    .profile-image-overlay {
        transition: none;
    }

    .profile-image-preview:hover {
        transform: none;
    }

    .btn-upload-profile:hover,
    .btn-remove-profile:hover {
        transform: none;
    }
}

/* Image Upload Container */
.image-upload-container {
    display: flex;
    align-items: flex-start;
}

/* Image Preview Box */
.image-preview-box {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.image-preview-box:hover {
    border-color: var(--primary-color, #707be5);
    background-color: #f3f4f6;
}

/* Preview Image */
.preview-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.preview-image.active {
    display: block;
}

/* Placeholder */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #9ca3af;
    text-align: center;
    padding: 20px;
}

.image-placeholder.hidden {
    display: none;
}

.image-placeholder i {
    font-size: 32px;
    color: #d1d5db;
}

.image-placeholder span {
    font-size: 12px;
    font-weight: 500;
}

/* Remove Button (Top Right) */
.btn-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    border: 2px solid white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.btn-remove-image:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.btn-remove-image i {
    font-size: 12px;
}

.btn-remove-image.active {
    display: flex;
}

/* Upload Actions */
.upload-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Upload Button */
.btn-upload-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--primary-color, #707be5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(112, 123, 229, 0.2);
    width: fit-content;
}

.btn-upload-image:hover {
    background-color: #5f6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 123, 229, 0.3);
}

.btn-upload-image:active {
    transform: translateY(0);
}

.btn-upload-image i {
    font-size: 16px;
}

/* Upload Info */
.upload-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 10px;
}

.upload-info i {
    color: var(--primary-color, #707be5);
    font-size: 14px;
}

/* Multiple Images Layout */
.image-upload-container.multiple-images {
    flex-direction: column;
}

/* Single Image Layout */
.image-upload-container.single-image {
    flex-direction: column;
    align-items: flex-start;
}

.image-upload-container.single-image.has-image {
    flex-direction: column;
}

.image-upload-container.single-image .image-preview-single {
    margin-bottom: 16px;
}

.image-upload-container.single-image .upload-actions {
    width: 100%;
}

.image-preview-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 16px;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    scrollbar-width: auto;
    scrollbar-color: #4b5563 #f3f4f6;
    padding-bottom: 20px;
    padding-left: 5px;
    padding-right: 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.image-preview-grid .image-preview-box {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 576px) {
    .image-upload-container {
        flex-direction: column;
    }

    .btn-upload-image {
        width: 100%;
    }
}

/* ==========================================
   STORE IMAGES DISPLAY IN VIEW MODAL
   ========================================== */

.store-images-display {
    margin-top: 10px;
}

.store-images-grid {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 10px;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    scrollbar-width: auto;
    scrollbar-color: #4b5563 #f3f4f6;
    padding-bottom: 20px;
    padding-left: 5px;
    padding-right: 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.store-image-item-view {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 120px;
    flex-shrink: 0;
}

.store-image-item-view:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.store-image-item-view img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 6px;
}

.store-image-item-view:hover img {
    transform: scale(1.05);
}

.no-images-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    background-color: var(--background-light);
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.no-images-message i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.no-images-message span {
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================
   AVATAR ICON PLACEHOLDER
   ========================================== */

.avatar-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
}

.avatar-icon-placeholder i {
    font-size: 48px;
    color: white;
}

/* Export-specific Styles */
.export-section {
    margin-bottom: 24px;
}

.export-section:last-child {
    margin-bottom: 0;
}

.export-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-section-title i {
    color: #6366f1;
}

/* Column Selection Styles */
.export-columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.export-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-checkbox-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.export-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6366f1;
}

.checkbox-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.export-select-actions {
    display: flex;
    gap: 16px;
    padding-top: 8px;
}

.btn-link {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #4f46e5;
}

/* Format Selection Styles */
.export-format-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.export-radio-label {
    display: block;
    cursor: pointer;
}

.export-radio-label input[type="radio"] {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.export-radio-label:hover .radio-content {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.export-radio-label input[type="radio"]:checked + .radio-content {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.radio-content i {
    font-size: 32px;
    margin-bottom: 8px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.export-radio-label input[type="radio"]:checked + .radio-content i {
    color: #6366f1;
}

.radio-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.radio-description {
    font-size: 12px;
    color: #6b7280;
}

/* Customer Type Toggle */
.customer-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.customer-type-toggle .toggle-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color, #e0e0e0);
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary, #666);
}

.customer-type-toggle .toggle-btn:hover {
    border-color: var(--primary-color, #007bff);
    background: var(--bg-hover, #e9ecef);
}

.customer-type-toggle .toggle-btn.active {
    border-color: var(--primary-color, #007bff);
    background: var(--primary-color, #007bff);
    color: white;
}

.customer-type-toggle .toggle-btn.active i {
    color: white;
}

/* ==========================================
   STORE PREVIEW STYLES
   ========================================== */

.preview-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.preview-header h4 i {
    margin-right: 0.5rem;
}

.preview-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.preview-content {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.preview-section {
    background: var(--bg-light, #f8f9fa);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.preview-section:last-child {
    margin-bottom: 0;
}

.preview-section-title {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-section-title i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-item.full-width {
    grid-column: span 2;
}

.preview-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-item span {
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-word;
}

.preview-images-grid {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    scrollbar-width: auto;
    scrollbar-color: #4b5563 #f3f4f6;
    padding-bottom: 15px;
    padding-left: 5px;
    padding-right: 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.preview-images-grid .preview-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.preview-images-grid .no-images {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .preview-item.full-width {
        grid-column: span 1;
    }
}

/* Custom Scrollbar for Image Grids */
.image-preview-grid::-webkit-scrollbar,
.store-images-grid::-webkit-scrollbar,
.preview-images-grid::-webkit-scrollbar {
    height: 10px;
    display: block !important;
}

.image-preview-grid::-webkit-scrollbar-track,
.store-images-grid::-webkit-scrollbar-track,
.preview-images-grid::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.image-preview-grid::-webkit-scrollbar-thumb,
.store-images-grid::-webkit-scrollbar-thumb,
.preview-images-grid::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 10px;
    border: 2px solid #f3f4f6;
    transition: background 0.3s ease;
}

.image-preview-grid::-webkit-scrollbar-thumb:hover,
.store-images-grid::-webkit-scrollbar-thumb:hover,
.preview-images-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #707be5);
}
