/* --- BROWSER COMPATIBILITY FIXES --- */

/* Reset for iOS Safari - Removes default rounded corners and shadows on inputs */
input:not([type="radio"]):not([type="checkbox"]), textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}

/* Fix for Safari Flexbox and scrolling */
.overlay {
    -webkit-backdrop-filter: blur(10px); /* Specific for Safari */
    display: none;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}
/* Red outline for invalid fields */
.validation-error {
    border-color: #ff3b30 !important; /* Apple Red */
    background-color: #fff2f1 !important;
    animation: shake 0.4s ease-in-out;
}

/* Shake animation keyframes */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
}

/* Highlight for Star Rating if missing */
.star-rating.error-shake {
    animation: shake 0.4s ease-in-out;
    background: #fff2f1;
    border-radius: 12px;
    padding: 5px;
}
/* Smooth scrolling for iOS devices */
.modal, .reviews-scroll-area, #reviewsList {
    -webkit-overflow-scrolling: touch;
}

/* Fix for Hero section on mobile Safari (prevents 100vh jumping) */
.hero {
    min-height: 60vh; /* Changed from height to min-height */
    height: auto;     /* Allows container to grow with content */
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: flex-start; /* Start from top to ensure visibility */
    text-align: center; 
    background: white;
    padding: 60px 20px; /* Add breathing room at top/bottom */
}

/* Table responsiveness for mobile browsers */
.admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure buttons don't have grey highlight on tap in Safari */
button, .logo, .view-btn {
    -webkit-tap-highlight-color: transparent;
}

/* Responsive Grid Adjustments */
@media (max-width: 600px) {
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .nav-container { flex-direction: row; font-size: 14px; }
    .logo { font-size: 18px; }
    .header-actions { gap: 5px; }
    .add-btn, .login-btn { padding: 6px 10px; font-size: 12px; }
    .modal { width: 85%; padding-top: 20px; padding-right: 20px; padding-left: 20px; }
}

:root {
    --apple-blue: #0071e3;
    --apple-dark: #1d1d1f;
    --apple-bg: #f5f5f7;
    --glass-bg: rgba(255, 255, 255, 0.85);
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica; margin: 0; background: var(--apple-bg); color: var(--apple-dark); }

.main-header { background: white; padding: 15px 5%; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 22px; font-weight: 700; }
.logo span { color: var(--apple-blue); }

.hero { height: 40vh; display: flex; align-items: center; justify-content: center; text-align: center; background: white; }
.hero h1 { font-size: 48px; letter-spacing: -1.5px; margin-bottom: 10px; }
.hero p { color: #6e6e73; font-size: 20px; }

.search-selection-box {
    background: white;
    padding: 35px;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    width: 90%;
    max-width: 450px;
    margin-top: 40px;
    text-align: left;
    border: 1px solid #eee;
}



/* Fix for the Hero selection box to stay inside mobile frames */
.search-selection-box {
    background: white;
    padding: 30px; /* Slightly reduced padding for mobile compatibility */
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    width: 95%; /* Responsive width */
    max-width: 450px;
    margin: 40px auto 0 auto; /* Centered */
    border: 1px solid #eee;
    box-sizing: border-box; /* Critical for browser cache layout stability */
}

.close-btn{
text-align: center;
cursor:pointer;
  font-size: 23px;
  right: 20px;
  top: 10px;
  position: absolute;
}




.container { max-width: 1100px; margin: 40px auto; padding: 0 20px; }
.results-toolbar { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; }
.back-btn { background: #e8e8ed;
  border: none;
  padding: 10px 20px;
  border-radius: 72px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px; }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.staff-card {
    background: #ffffff;
cursor:pointer;
    border-radius: 18px;
    padding: 20px;
    transition: transform 0.3s ease; /* Keep the hover lift, but remove the loading fade */
    /* opacity: 0;  <-- REMOVE THIS if it exists */
    /* transform: translateY(20px); <-- REMOVE THIS if it exists */
}
.staff-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.view-btn { width: 100%; background: #f2f2f7; border: none; padding: 12px; border-radius: 12px; font-weight: 600; cursor: pointer; color: var(--apple-dark) !important;}

.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(10px); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: white; border-radius: 24px; width: 90%; max-width: 400px; max-height: 80vh; overflow-y: auto;  padding-top: 30px;
  padding-left: 30px;
  padding-right: 30px; }

.btn-save { width: 100%; background: var(--apple-dark); color: white; padding: 15px; border-radius: 12px; border: none; font-weight: 600; cursor: pointer; margin-top: 10px; }
.btn-cancel { width: 100%; background: none; border: none; padding: 10px; color: var(--apple-blue); cursor: pointer; }

input, select, textarea { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 10px; border: 1px solid #d2d2d7; box-sizing: border-box; }

.full-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.spinner { width: 40px; height: 40px; border: 4px solid #f3f3f3; border-top: 4px solid var(--apple-blue); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Profile Modal Specifics */
.profile-modal {
    max-width: 500px;
    padding: 0; /* Let children handle padding */
}

.profile-header {
    background: #f9f9fb;
    padding: 30px;
    border-radius: 24px 24px 0 0;
    border-bottom: 1px solid #eee;
}

.profile-bio {
    padding: 20px 30px;
}

.profile-bio table {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

.profile-bio strong {
    color: #86868b;
    width: 160px;
    display: inline-block;
}

.reviews-scroll-area {
    padding: 0 30px;
    max-height: 250px;
    overflow-y: auto;
}

.review-item {
    padding: 15px 0;
    border-bottom: 1px solid #f2f2f7;
}

.rev-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.rev-stars { font-size: 12px; margin-top: 5px;}
.rev-text { font-size: 14px; color: #444; margin: 0; line-height: 1.4; }

.empty-text {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

hr { border: 0; border-top: 1px solid #eee; margin: 0; }
.review-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.review-item:last-child {
    border-bottom: none;
}
#reviewsList {
    max-height: 300px;
    overflow-y: auto;
}
/* --- FIX: STAR RATING UI --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse; /* Allows us to use the ~ selector for highlighting */
    justify-content: center;
    gap: 10px;
    padding: 20px 0;
    margin-bottom: 10px;
}

/* Hide the actual radio buttons */
.star-rating input {
    display: none !important; /* Override your global input style */
}

/* Style the Stars */
.star-rating label {
    font-size: 35px;
    color: #d2d2d7; /* Apple gray */
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0 !important; /* Reset global margin */
    width: auto !important; /* Reset global width */
}

/* Hover and Checked Logic */
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffcc00; /* Gold/Star color */
}

/* --- FIX: MODAL BUTTONS --- */
.modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-btns .btn-save {
    margin-top: 0; /* Align with cancel button */
    flex: 2;
}

.modal-btns .btn-cancel {
    flex: 1;
    background: #f2f2f7;
    border-radius: 12px;
    color: var(--apple-dark);
}

/* --- FIX: FORM OVERRIDE --- */
/* Prevent text inputs from being too tall in the review modal */
#reviewOverlay input, #reviewOverlay textarea {
    border: 1px solid #d2d2d7;
    background: #f9f9fb;
    margin-bottom: 0px !important;
}

/* Admin UI Elements */
.admin-tools {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    margin-top: 10px;
}

.tool-btn {
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.edit { background: #e3f2fd; color: #1976d2; }
.verify { background: #e8f5e9; color: #2e7d32; }
.delete { background: #ffebee; color: #c62828; }

.status-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}
.status-tag.verified { background: #4caf50; color: white; }
.status-tag.pending { background: #ff9800; color: white; }

.min-btn {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-right: 5px;
    cursor: pointer;
}
.approve { background: #4caf50; color: white; border: none; }
.reject { background: white; color: #f44336; }

/* Admin Card Layout */
.admin-card {
    border: 1px solid #d2d2d7;
}

.card-actions-wrapper {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.tool-btn {
    padding: 10px 5px;
    border-radius: 10px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.edit { background: #e3f2fd; color: #0071e3; }
.verify { background: #e8f5e9; color: #2e7d32; }
.delete { background: #ffebee; color: #ff3b30; }

.status-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}
.status-tag.verified { background: #34c759; color: white; }
.status-tag.pending { background: #ff9500; color: white; }


/* Admin Specific Styles */
.admin-card-style {
    border: 2px solid #e1e1e1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-actions-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- LAPTOP/DESKTOP OPTIMIZATION --- */
@media (min-width: 768px) {
  .admin-table {
      display: inline-table !important;
  }
}


.admin-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.adm-btn {
    padding: 10px 2px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.edit-bg { background: #0071e3; color: white; }
.verify-bg { background: #34c759; color: white; }
.delete-bg { background: #ff3b30; color: white; }

.status-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
}
.status-tag.verified { background: #34c759; }
.status-tag.pending { background: #ff9500; }

/* Ensure modal buttons are always at the bottom and visible */
.profile-modal {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-btns {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
}

/* Scroll indicator styling */
.scroll-indicator {
    text-align: center;
    font-size: 11px;
    color: var(--apple-blue);
    background: #f0f7ff;
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Make review area scrollable */
.reviews-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 30px;
}
.animate-in {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.staff-card {
    will-change: transform, opacity;
    transform: translateZ(0); /* Forces GPU rendering */
    backface-visibility: hidden;
}
#homeView {
    display: block;
    flex-direction: column;
    align-items: center; /* Forces horizontal center */
    justify-content: center;
    width: 100%;
    min-height: 50vh; /* Keeps the page height stable */
    text-align: center;
    margin: 0 auto;
}

/* Ensure the selection box container has a fixed max-width */
.search-container {
    width: 90%;
    max-width: 500px;
    margin: 0 auto; /* Keeps it centered in all views */
    display: block;
}

/* Fix the profile wrap to ensure it stays above staff cards */
.profile-container {
    position: relative;
    display: inline-block;
    z-index: 9999; /* Ensures it stays above the staff grid */
}

.logout-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 8px;
    margin-top: 8px;
    min-width: 150px;
}

/* Force show on hover */
.profile-container:hover .logout-dropdown {
    display: block !important;
}

.btn-logout-action {
    background: none;
    border: none;
    color: #ff3b30;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 8px;
}

.btn-logout-action:hover {
    background: #fff1f0;
}

/* Prevent layout shift from scrollbar disappearing */
html {
    overflow-y: scroll; 
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.status-approved { color: green; font-weight: bold; }
.status-pending { color: orange; font-weight: bold; }

.status-pill { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; }
.status-pill.approved { background: #e6f4ea; color: #1e7e34; }
.status-pill.pending { background: #fff4e5; color: #b7791f; }

/* Admin Buttons */
.btn-view, .btn-approve, .btn-delete {
    border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 500; margin-right: 5px; transition: 0.2s;
  margin-bottom: 3px;
}
.btn-view { background: #0071e3; color: white; }
.btn-approve { background: #34c759; color: white; }
.btn-delete { background: #ff3b30; color: white; }

/* Highlight for Pending Reviews */
.pulse-highlight {
    background: #af52de !important; /* Purple to stand out */
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(175, 82, 222, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(175, 82, 222, 0); }
}

/* Container for alignment (add to your HTML if needed) */
.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
}

/* Add Staff Button - Primary Action */
.add-btn {
    background-color: #28a745; /* Success Green */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.add-btn:hover {
    background-color: #218838;
}

/* Admin Login Button - Secondary Action */
.login-btn {
    background-color: #f8f9fa;
    color: #007bff; /* Blue */
    border: 1px solid #007bff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    box-shadow: 2px 2px 12px lightgray;
}

/* Interaction feedback for both */
.add-btn:active, .login-btn:active {
    transform: scale(0.96);
}

.login-btn.logout-mode {
    color: #dc3545; /* Red */
    border-color: #dc3545;
}

.login-btn.logout-mode:hover {
    background-color: #dc3545;
    color: white;
}

/* --- HOMEPAGE SEARCH BOX (Custom Apple-Style) --- */
#mainCategorySelect {
    width: 100%;
    padding: 18px 45px 18px 25px !important; 
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    font-size: 1.1rem;
    cursor: pointer;
    background-color: #F8F8F8;
    box-sizing: border-box; /* Prevents mobile overflow */

    /* Custom Arrow Logic */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

/* Make dropdowns look exactly like text inputs */
#gender, 
#serviceCategory {
background: white;
  color: gray;
}

/* Ensure the Age input and Gender dropdown have the exact same height */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0px; /* Aligned with input flow */
}

/* Match focus state to other fields */
#gender:focus, #serviceCategory:focus {
    border-color: var(--apple-blue);
    outline: none;
}


#staffForm input, #staffForm select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Crucial for layout stability */
}
.status-pill.taken-down {
    background: #8e8e93; /* Grayish color for inactive */
    color: white;
}

/* Ensure the red reported button in the table looks like a small pill */
.min-btn {
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
.btn-save { background: #34c759; color: white; border: none; padding: 12px; border-radius: 6px; cursor: pointer; }
.btn-cancel { background: #eee; color: #333; border: none; padding: 12px; border-radius: 6px; cursor: pointer; }

/* 1. Global fix for overflow and dropdown consistency */
* {
    box-sizing: border-box; /* Includes padding in the width calculation */
}

/* 2. Reset dropdowns for Safari/Chrome/Firefox consistency */
select {
    -webkit-appearance: none; /* Removes Safari default styling */
    -moz-appearance: none;    /* Removes Firefox default styling */
    appearance: none;         /* Standard reset */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center; /* Adds a custom uniform arrow */
    padding-right: 40px !important; 
}

/* 3. Mobile-specific overflow fix */
@media (max-width: 600px) {
    .search-selection-box {
        width: 92%;      /* Slightly smaller to ensure breathing room */
        padding: 20px;   /* Reduced padding so it doesn't feel cramped */
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero h1 {
        font-size: 28px; /* Prevents long titles from breaking layout */
        padding: 0 10px;
    }
}

/* Grouping logic */
#loggedOutControls {
    display: flex;
    gap: 10px;
}

/* User Name Tag Styling */
.user-name-tag {
    font-weight: 600;
    color: #0071e3;
    padding: 8px 12px;
    cursor: default;
}

/* Simplified Logout Button */
.simple-logout-btn {
    background: #ff3b30;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.simple-logout-btn:hover {
    opacity: 0.8;
}

/* Positioning the dropdown */
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
}

/* Styling for Review Management in Admin View */
.admin-review-btns {
    display: flex;
    gap: 8px;
}

.status-tag.rejected {
    background: #ff3b30;
    color: white;
}

.status-tag.approved {
    background: #34c759;
    color: white;
}

/* Ensure the Review Pending pulse button in the table is visible */
.pulse-highlight {
    background: #5856d6 !important; /* iOS Purple */
    color: white !important;
    font-weight: bold;
}

.banner-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 95%;
    max-width: 900px;
    margin: 40px auto;
    padding-bottom: 50px;
}

.banner {
    padding: 30px;
    border-radius: 24px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
}

.about-banner { background: rgba(0, 113, 227, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 113, 227, 0.15);
  box-shadow: 0 8px 32px rgba(0, 113, 227, 0.05);
  border-radius: 20px;
 }
.feedback-banner { background: rgba(0, 113, 227, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 113, 227, 0.15);
  box-shadow: 0 8px 32px rgba(0, 113, 227, 0.05);
  border-radius: 20px; }

.banner:hover { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }

.banner h3 { margin: 0 0 8px 0; font-size: 20px; color: var(--apple-dark); }
.banner p { margin: 0 0 15px 0; font-size: 14px; color: #6e6e73; line-height: 1.4; }
.banner-link { font-weight: 600; color: var(--apple-blue); font-size: 14px; }

@media (max-width: 600px) {
    .banner-container { grid-template-columns: 1fr; }
    .banner { padding: 25px; }
}

#staffGrid:empty::after {
    content: "No results found.";
    display: block;
    width: 100%;
    text-align: center;
    color: #86868b;
    padding: 50px 0;
}

/* Report Icon in Profile Modal */
.report-trigger {
    position: absolute;
    top: 20px;
    right: 50px; /* To the left of the close button */
    cursor: pointer;
    font-size: 18px;
    color: #86868b;
    transition: color 0.2s;
    z-index: 10;
}
.report-trigger:hover { color: #ff3b30; }

/* Inline Report Form */
#reportFormContainer {
    display: none;
    background: #fff2f1;
    padding: 15px;
    border-radius: 12px;
    margin: 10px 30px;
    border: 1px solid #ff3b30;
}

#reportReason {
    width: 100%;
    height: 60px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Admin Specific */
.report-warning-icon {
    color: #ff3b30;
    margin-right: 8px;
    font-weight: bold;
    cursor: help;
}

.verified-seal {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.verified-seal svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(52, 199, 89, 0.2));
}

.verified-text {
    font-size: 8px;
    font-weight: 800;
    color: #34c759;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-transform: uppercase;
}



.admin-access-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s;
}

.admin-access-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.category-badge, .badge-other {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e5f1ff;
    color: #007aff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    z-index: 5;
    text-transform: uppercase;
}



/* --- MODERN UPLOAD BUTTON --- */
.modern-upload-container {
    background: #f5f5f7;
    border: 2px dashed #d2d2d7;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.modern-upload-container:hover {
    border-color: var(--apple-blue);
    background: #ffffff;
}

/* Hide the actual input */
#staffDoc {
    display: none;
}

/* Style the label as a button */
.custom-file-upload {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--apple-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.custom-file-upload:active {
    transform: scale(0.95);
}

.file-name-text {
    margin-top: 10px;
    font-size: 12px;
    color: #86868b;
    font-italic: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remove-file-btn {
    background: #ff3b301a; /* Very light Apple Red */
    color: #ff3b30;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-file-btn:hover {
    background: #ff3b30;
    color: white;
}

/* Update the filename text to look better next to a button */
.file-name-text {
    margin-top: 0 !important; /* Reset the margin we added earlier */
    max-width: 200px;
}





.alert-modal {
    max-width: 320px !important;
    text-align: center;
    padding: 30px !important;
    border-radius: 24px !important;
    animation: alertPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.close-alert {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    color: #86868b;
    cursor: pointer;
    transition: 0.2s;
}

.close-alert:hover {
    color: #1d1d1f;
}


#charCounter{
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  margin-bottom: 15px;
  color: gray !important;
}






.admin-status-badge {
    font-size: 10px;
    font-weight: bold;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.tile-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#customAlertTitle{
color: #595959;
}

#customAlertMsg{
    color: #808080;
}





/* Container for the radio button group */
.radio-group-container {
    display: flex;
    gap: 25px;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
border: 1px solid lightgray;
}

/* The label that wraps the radio and text */
.radio-label {
    display: inline-flex; /* Changed from flex to inline-flex */
    align-items: center;  /* This is the magic line for vertical alignment */
    gap: 8px;            /* Space between circle and text */
    cursor: pointer;
    font-size: 15px;
    color: var(--apple-dark);
    line-height: 1;      /* Prevents text height from pushing the line down */
    font-size: 14px;
    color: #595959;
}

/* Ensure the radio button itself doesn't have extra margins */
.radio-label input[type="radio"] {
    margin: 0 !important;
    width: 14px !important;
    height: 14px !important;
    cursor: pointer;
}






.full-loader {
    /* Use fixed to stay relative to the screen, not the popup */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    
    /* Ensure it is on top of everything */
    z-index: 999999 !important; 
    
    /* Center the spinner */
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    
    /* Dim the background slightly to show it's "loading" */
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    
    /* Prevent any clicks from passing through */
    pointer-events: all !important;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0071e3; /* Apple Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}








/* --- ENHANCED MOBILE INPUT SIZES --- */

/* 1. The Terms Checkbox (Login) */
#termsCheckbox {
    /* Critical: must be square and larger for fingers */
    width: 22px !important; 
    height: 22px !important;
    
    /* Remove default styling to ensure custom size works on iOS */
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    
    cursor: pointer;
    margin: 0 !important; /* Removes that 15px bottom margin from your global style */
    flex-shrink: 0;
    accent-color: var(--apple-blue); /* Sets the checkmark color */
}

/* 2. The Radio Buttons (Request Modal) */
.radio-group-container input[type="radio"] {
    /* Critical: Big enough to tap easily */
    width: 15px !important; 
    height: 15px !important;
    
    /* Ensure it stays a circle on all browsers */
    -webkit-appearance: radio !important;
    appearance: radio !important;
    
    margin: 0 !important; /* Removes the 15px global margin */
    flex-shrink: 0;
    accent-color: var(--apple-blue);
    cursor: pointer;
}

/* 3. Spacing and alignment for the container */
.radio-group-container {
    display: flex;
    align-items: center; /* Ensures the text and the big button stay centered */
    gap: 12px;
    padding: 15px;
    border-radius: 14px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px; /* Slightly larger text to match larger buttons */
}