  .btn{ padding:0.5rem 0.75rem; border-radius:0.5rem; background:#334155; color:#fff; }
  .btn:hover{ background:#475569; }
  .label{ font-size:0.875rem; color:#cbd5e1; }
  .value{ font-size:0.75rem; color:#94a3b8; margin-left:0.25rem; }
  .slider{ -webkit-appearance:none; appearance:none; height:6px; border-radius:3px; background:#475569; outline:none; }
  .slider::-webkit-slider-thumb{ -webkit-appearance:none; width:16px; height:16px; border-radius:50%; background:#a855f7; cursor:pointer; }
  .slider::-moz-range-thumb{ width:16px; height:16px; border-radius:50%; background:#a855f7; cursor:pointer; }
  /* Stage sizing so image never hides behind tools */
  #photoEditorModal .image-viewport{ height: calc(80vh - 160px); max-height: 680px; min-height: 360px; }
  #photoEditorModal .cropper-container,
  #photoEditorModal .cropper-wrap-box,
  #photoEditorModal .cropper-canvas,
  #photoEditorModal .cropper-drag-box,
  #photoEditorModal .cropper-crop-box{ max-width:100% !important; max-height:100% !important; }

  /* Notification animations */
    @keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.5;
        }
    }

    .notification-item.new {
        animation: slideInRight 0.3s ease-out;
    }

    .notification-badge-pulse {
        animation: pulse 2s ease-in-out infinite;
    }

    /* Smooth transitions for notification badge */
    #notificationCount {
        transition: all 0.3s ease;
    }

    #notificationCount:not(.hidden) {
        transform: scale(1.1);
    }

    /* ==================== MESSAGE ANIMATIONS ==================== */

/* Fade in animation for new messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Conversation item hover effect */
.conversation-item {
    transition: all 0.3s ease;
}

.conversation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

/* Message bubble animations */
.message-bubble {
    animation: messageSlideIn 0.3s ease-out;
}

/* Typing indicator animation */
@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.typing-indicator span {
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Smooth expand/collapse for Messages section */
#messagesContent {
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
}

#messagesContent.collapsed {
    opacity: 0.7;
}

/* Unread badge pulse animation */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.unread-badge {
    animation: badgePulse 2s infinite;
}

/* Message input focus effect */
#newMessageInput:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
}

/* ==================== REDESIGNED MOBILE PHOTO EDITOR ==================== */

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Photo editor base styles */
#photoEditorModal .btn {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    background: #334155;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 44px;
    white-space: nowrap;
}
#photoEditorModal .btn:hover {
    background: #475569;
}

#photoEditorModal .label {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 500;
}

#photoEditorModal .value {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 600;
}

#photoEditorModal .slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #475569;
    outline: none;
}

#photoEditorModal .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#photoEditorModal .slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #a855f7;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Image viewport sizing */
#photoEditorModal #imageViewport {
    width: 100%;
    height: 100%;
}

/* Desktop tools panel - full height */
@media (min-width: 1024px) {
    #editorToolsPanel {
        max-height: none !important;
        height: 100%;
        overflow-y: auto;
    }

    /* Active aspect ratio button */
#photoEditorModal .aspect-btn.active {
    background: linear-gradient(to right, #a855f7, #6366f1) !important;
    color: white !important;
    border-color: transparent !important;
}

/* Save indicator animation */
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
}

/* Cropper container constraints */
#photoEditorModal .cropper-container,
#photoEditorModal .cropper-wrap-box,
#photoEditorModal .cropper-canvas,
#photoEditorModal .cropper-drag-box,
#photoEditorModal .cropper-crop-box {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Active tab styling */
#photoEditorModal .editor-tab {
    transition: all 0.2s ease;
}

/* Mobile specific */
@media (max-width: 1023px) {
    /* Force side-by-side tabs on mobile */
    #photoEditorModal .flex.items-center.gap-2.px-2 {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
    }

    /* Make tabs equal width and touch-friendly */
    #photoEditorModal .editor-tab {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 48px !important;
    }

    /* Crop buttons horizontal scroll */
    #cropPanel .flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    #cropPanel .btn {
        flex-shrink: 0 !important;
        min-width: auto !important;
    }

    /* Hide desktop slider layout on mobile - use popup instead */
    #adjustPanel > .hidden.lg\:block {
        display: none !important;
    }

    /* Show mobile adjust buttons as horizontal flex */
    #adjustPanel .lg\:hidden {
        display: block !important;
    }

    #adjustPanel .lg\:hidden > .flex.gap-2 {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
    }

    /* Hide any stray inline sliders on mobile */
    #adjustPanel input[type="range"]:not(#activeSlider) {
        display: none !important;
    }
}

/* Desktop adjustments */
@media (min-width: 1024px) {
    /* Modal sizing */
    #photoEditorModal > div:first-child + div {
        max-width: 1200px;
        margin: 2rem auto;
        height: calc(100vh - 4rem);
        border-radius: 1rem;
    }

    /* Remove scroll from panels - show all content */
    #cropPanel,
    #adjustPanel {
        max-height: none !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    /* Ensure hidden panels stay hidden */
    #cropPanel.hidden,
    #adjustPanel.hidden {
        display: none !important;
    }

    /* Desktop: Hide mobile Instagram-style buttons */
    #adjustPanel .lg\:hidden {
        display: none !important;
    }

    /* Desktop: Show full slider layout */
    #adjustPanel .hidden.lg\:block {
        display: block !important;
    }

    /* Desktop: Hide the mobile slider popup */
    #activeSliderPanel {
        display: none !important;
    }

    /* Remove any nested scroll containers */
    #cropPanel > div,
    #adjustPanel > div {
        overflow: visible !important;
        max-height: none !important;
    }

    /* Desktop grid for crop buttons - no scroll */
    #cropPanel .flex.gap-2,
    #cropPanel .flex.lg\:grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    /* Ensure space-y doesn't create overflow */
    #cropPanel .space-y-2,
    #cropPanel .space-y-4,
    #adjustPanel .space-y-2,
    #adjustPanel .space-y-4 {
        overflow: visible !important;
    }

    /* Make sure nested divs don't scroll */
    #adjustPanel .space-y-2 > div,
    #adjustPanel .space-y-4 > div {
        overflow: visible !important;
    }

    /* Desktop sliders section - no scroll */
    #adjustPanel > div {
        overflow: visible !important;
        display: block !important;
    }

    /* Desktop sliders and buttons spacing */
    #adjustPanel > div > div {
        padding: 0.5rem 0;
    }
}

/* Force public profile to use full width */
#publicView.profile-only-mode {
    max-width: 1600px !important;
    width: 100% !important;
}

/* ==================== PROFILE-ONLY VIEW MIDDLE COLUMN FIX ==================== */

/* Ensure profile card in middle column has proper width and no text truncation */
#profileOnlyCard .bg-slate-800 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Ensure flex-1 content areas don't get squeezed */
#profileOnlyCard .bg-slate-800 .flex-1 {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
}

/* Prevent text truncation in all text elements */
#profileOnlyCard .bg-slate-800 p,
#profileOnlyCard .bg-slate-800 .text-sm,
#profileOnlyCard .bg-slate-800 .text-gray-400,
#profileOnlyCard .bg-slate-800 .text-gray-300 {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-wrap: break-word !important;
}

/* Ensure address/location lines display fully */
#profileOnlyCard .bg-slate-800 .text-sm.text-gray-400 {
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure phone/text links display fully */
#profileOnlyCard .text-center.text-sm.text-indigo-300 {
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

#profileOnlyCard .text-center.text-sm.text-indigo-300 a {
    display: inline-block !important;
    white-space: normal !important;
}

/* Ensure bio container has full width and proper spacing */
#profileOnlyCard .px-5.pb-4.min-h-\[4rem\] {
    width: 100% !important;
    padding-bottom: 1.5rem !important;
    margin-bottom: 1rem !important;
    min-height: auto !important;
}

#profileOnlyCard .px-5.pb-4.min-h-\[4rem\] p {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0.5rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Ensure bio has minimal bottom spacing - target the exact container */
#profileOnlyCard .bg-slate-800 > .px-5.pb-4.min-h-\[4rem\] {
    margin-bottom: 0 !important;
    padding-bottom: 0.5rem !important;
}

/* First button container (Schedule Appointment) - reduce top spacing */
#profileOnlyCard .bg-slate-800 > .px-5.pb-3:nth-of-type(4) {
    margin-top: 0 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.5rem !important;
}

/* Second button container (Send Message) - reduce all spacing */
#profileOnlyCard .bg-slate-800 > .px-5.pb-3:nth-of-type(5) {
    margin-top: 0 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.5rem !important;
}

/* Phone/text container - reduce padding */
#profileOnlyCard .bg-slate-800 > .text-center.pb-4 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
    margin: 0 !important;
}

/* Fix phone/text numbers to display side-by-side on all screens */
#profileOnlyCard .text-center.pb-4.text-sm.text-indigo-300.space-x-4,
#profileOnlyCard .text-center.text-sm.text-indigo-300.space-x-4 {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 1rem 1.25rem !important;
}

#profileOnlyCard .text-center.pb-4.text-sm.text-indigo-300.space-x-4 a,
#profileOnlyCard .text-center.text-sm.text-indigo-300.space-x-4 a {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
}

/* Portfolio section - reduce top padding */
#profileOnlyCard .bg-slate-800 > .px-5.pb-5 {
    padding-top: 0.5rem !important;
    margin-top: 0 !important;
}

/* Mobile specific - reduce font size and adjust layout */
@media (max-width: 768px) {
    #profileOnlyCard .text-center.text-sm.text-indigo-300.space-x-4 {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.75rem !important;
        justify-content: space-evenly !important;
    }

    #profileOnlyCard .text-center.text-sm.text-indigo-300.space-x-4 a {
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }
}

/* Ensure service dropdown displays fully */
#profileOnlyCard select.portfolio-filter {
    width: 100% !important;
    max-width: none !important;
    min-width: 140px !important;
    white-space: normal !important;
    overflow: visible !important;
}

/* Ensure stars/rating/badge line displays properly */
#profileOnlyCard .bg-slate-800 .flex.items-center.gap-1 {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
}

/* Responsive adjustments for profile-only middle column */
@media (min-width: 1024px) {
    /* Ensure all three columns are equal width */
    #profileOnlyHeader .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }

    /* Ensure card content doesn't overflow */
    #profileOnlyCard {
        overflow: visible !important;
    }

    /* Make sure middle column card matches width of public search cards */
    #profileOnlyCard .bg-slate-800 {
        max-width: 100% !important;
        width: 100% !important;
    }
}

@media (max-width: 1023px) {
    /* On tablet/mobile, give full width */
    #profileOnlyCard .bg-slate-800 {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ==================== MOBILE PROFILE CARD HEADER FIX ==================== */

@media (max-width: 768px) {
    /* Ensure header content area has enough width */
    .bg-slate-800 .flex-1 {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    /* Force stars/rating/badge to stay on one line */
    .bg-slate-800 .flex-1 > div[style*="flex-wrap: nowrap"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Reduce star size even more on mobile */
    .bg-slate-800 .flex-1 .flex.text-yellow-400 span {
        font-size: 0.75rem !important;
    }
}

/* FORCE horizontal layout for profile header on mobile */
@media (max-width: 768px) {
    /* Override any vertical stacking in profile headers */
    .bg-slate-800 .flex-1 > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 0.375rem !important;
    }

    /* Ensure stars/rating/badge container is horizontal */
    .bg-slate-800 .flex-1 > div[style*="nowrap"] {
        flex-direction: row !important;
        justify-content: flex-start !important;
    }

    /* Make stars extra small on mobile */
    .bg-slate-800 .text-yellow-400 {
        font-size: 0.65rem !important;
    }

    /* Make rating extra small */
    .bg-slate-800 .text-yellow-400 + span {
        font-size: 0.6rem !important;
    }
}

/* ==================== MOBILE PROFILE CARD FIXES ==================== */
@media (max-width: 639px) {
    /* Smaller avatar on mobile */
    #profilesGrid .w-16.h-16,
    #profileOnlyCard .w-16.h-16 {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1rem !important;
    }

    /* Smaller name text */
    #profilesGrid h3.text-xl,
    #profileOnlyCard h3.text-xl {
        font-size: 1rem !important;
        line-height: 1.25rem !important;
    }

    /* Tighter spacing in header */
    #profilesGrid .space-x-4,
    #profileOnlyCard .space-x-4 {
        gap: 0.75rem !important;
    }

    /* Smaller info text */
    #profilesGrid .text-sm.text-gray-400,
    #profileOnlyCard .text-sm.text-gray-400 {
        font-size: 0.75rem !important;
        line-height: 1rem !important;
    }

    /* Compact badges */
    #profilesGrid .text-\[10px\],
    #profileOnlyCard .text-\[10px\] {
        font-size: 9px !important;
        padding: 0.125rem 0.375rem !important;
    }

    /* Allow badge row to wrap */
    #profilesGrid .flex.items-center.flex-wrap,
    #profileOnlyCard .flex.items-center.flex-wrap {
        row-gap: 0.25rem !important;
    }

    /* Smaller rating stars */
    #profilesGrid .text-yellow-400 span,
    #profileOnlyCard .text-yellow-400 span {
        font-size: 0.6rem !important;
    }

    /* Price display compact */
    #profilesGrid .text-green-400.font-semibold,
    #profileOnlyCard .text-green-400.font-semibold {
        font-size: 0.8rem !important;
    }
}

/* ==================== CONSISTENT BADGE HEIGHTS ==================== */
/* Make Licensed/Unverified badge match other badges */
#profilesGrid .bg-green-500,
#profilesGrid .bg-red-500,
#profileOnlyCard .bg-green-500,
#profileOnlyCard .bg-red-500 {
    font-size: 10px !important;
    font-weight: 500 !important;
    padding: 0.125rem 0.375rem !important;
}

/* ==================== SALON/SCHOOL NAME + BADGE SAME LINE ==================== */
@media (max-width: 639px) {
    /* Target all h3 in profile cards */
    #profilesGrid h3.text-xl {
        max-width: 150px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex-shrink: 1 !important;
    }

    /* Prevent ALL badge rows from wrapping in profile cards */
    #profilesGrid .flex.items-center.flex-wrap.gap-1 {
        flex-wrap: nowrap !important;
    }
}
