/* ========================= */
/* MARKETPLACE REPORTING DRAWER */
/* ========================= */

.report-drawer {
    height: 90vh;
}

.report-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.report-title {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #111;
}

.report-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Listing Preview Card */
.report-listing-preview {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.preview-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
}

.preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.preview-image-placeholder {
    width: 80px;
    height: 80px;
    background: #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-image-placeholder svg {
    color: #9ca3af;
}

.preview-info {
    flex: 1;
    min-width: 0;
}

.preview-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.preview-meta {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-price {
    font-weight: 600;
    color: #0b7d62;
}

/* Report Reasons Section */
.report-reasons-section {
    padding: 20px;
}

.section-label {
    margin: 0 0 6px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.section-hint {
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.report-reasons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-reason-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.report-reason-item:active {
    transform: scale(0.98);
}

.report-reason-item.selected {
    background: #f0fdf4;
    border-color: #0b7d62;
}

.reason-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: white;
}

.report-reason-item.selected .reason-checkbox {
    background: #0b7d62;
    border-color: #0b7d62;
}

.checkbox-icon {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    color: white;
}

.report-reason-item.selected .checkbox-icon {
    opacity: 1;
    transform: scale(1);
}

.reason-content {
    flex: 1;
}

.reason-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
    color: #111;
}

.reason-description {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Additional Details Section */
.report-details-section {
    padding: 20px;
    padding-bottom: 100px;
}

.report-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.report-textarea:focus {
    outline: none;
    border-color: #0b7d62;
    box-shadow: 0 0 0 3px rgba(11, 125, 98, 0.1);
}

.char-counter {
    text-align: right;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Footer Buttons */
.report-drawer .drawer-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.report-drawer .btn-secondary,
.report-drawer .btn-primary {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-drawer .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.report-drawer .btn-secondary:active {
    background: #e5e7eb;
}

.report-drawer .btn-primary {
    background: #0b7d62;
    color: white;
}

.report-drawer .btn-primary:active {
    background: #096c54;
}

.report-drawer .btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
    .report-reasons-list {
        gap: 8px;
    }
    
    .report-reason-item {
        padding: 12px;
    }
    
    .reason-label {
        font-size: 0.9rem;
    }
    
    .reason-description {
        font-size: 0.82rem;
    }
}

/* ========================= */
/* Settings Gear Button Styles */
/* ========================= */

.settings-gear-btn {
    background: transparent !important;
    border: none !important;
    color: var(--brand) !important;
    padding: 8px !important;
    min-width: auto !important;
    font-size: 1.4rem !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    line-height: 1 !important;
}

.settings-gear-btn:hover {
    background: rgba(11, 125, 98, 0.1) !important;
    transform: scale(1.1) !important;
}

.settings-gear-btn:active {
    background: rgba(11, 125, 98, 0.2) !important;
    transform: scale(0.95) !important;
}

/* ========================= */
/* Settings Drawer - WhatsApp Style */
/* ========================= */

/* Overlay */
#settingsDrawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: none;
    z-index: 9999;
    transition: background-color 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

#settingsDrawer.active {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Drawer Content */
#settingsDrawer .drawer-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: white;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth scrolling */
    -webkit-overflow-scrolling: touch;
    /* Hardware acceleration */
    will-change: transform;
    /* Prevent text selection during drag */
    user-select: none;
    -webkit-user-select: none;
}

#settingsDrawer.active .drawer-content {
    transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Drawer Body */
.drawer-body {
    padding: 16px 20px;
}

/* Settings Section */
.settings-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Settings Item */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 14px 12px;
    background: none;
    border: none;
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 8px;
    text-align: left;
    /* Remove tap highlight */
    -webkit-tap-highlight-color: transparent;
}

.settings-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.settings-item:active {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(0.98);
}

.settings-item span:first-child {
    font-weight: 500;
}

.settings-item span:last-child {
    font-size: 1.2rem;
    opacity: 0.6;
}

/* Sign Out Button */
.settings-section .btn.warning {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #e5e7eb !important;
    width: 100%;
    margin-top: 8px;
}

.settings-section .btn.warning:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.settings-section .btn.warning:active {
    transform: scale(0.98);
}

/* Prevent body scroll when drawer is open */
body:has(#settingsDrawer.active) {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #settingsDrawer .drawer-content {
        width: 280px;
        max-width: 75%;
    }
}

@media (max-width: 480px) {
    #settingsDrawer .drawer-content {
        width: 260px;
        max-width: 70%;
    }
    
    .drawer-header {
        padding: 16px;
    }
    
    .drawer-body {
        padding: 12px 16px;
    }
    
    .settings-item {
        padding: 12px 10px;
        font-size: 0.95rem;
    }
}

/* Smooth animation for all interactive elements */
#settingsDrawer * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================= */
/* About AppLoads Modal - ISOLATED */
/* ========================= */

/* Modal Overlay */
#aboutModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#aboutModal.show {
    display: flex !important;
    opacity: 1;
}

/* Dialog Container */
.about-dialog {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    margin: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#aboutModal.show .about-dialog {
    transform: scale(1);
}

/* Header */
.about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #ffffff;
}

.about-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #101828;
}

.about-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.about-close:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

.about-close:active {
    transform: scale(0.95);
}

/* Body */
.about-body {
    padding: 30px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    text-align: center;
}

/* Logo */
.about-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.about-logo svg {
    color: #0b7d62;
    width: 64px;
    height: 64px;
}

/* App Title */
.about-app-title {
    margin: 0 0 6px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #101828;
}

/* Tagline */
.about-tagline {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Version Badge */
.about-version {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f7fb;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.version-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
}

.version-number {
    font-size: 0.85rem;
    color: #0b7d62;
    font-weight: 700;
}

/* Description */
.about-description {
    margin-bottom: 24px;
    line-height: 1.6;
    color: #101828;
    text-align: left;
}

.about-description p {
    margin: 0;
}

/* Sections */
.about-section {
    text-align: left;
    margin-bottom: 20px;
    padding: 18px;
    background: #f5f7fb;
    border-radius: 12px;
}

.about-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #101828;
}

.about-section ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.about-section li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #101828;
}

/* Links */
.about-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    color: #0b7d62;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.about-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #0b7d62;
}

.about-link:active {
    transform: translateY(0);
}

.about-link svg {
    color: #0b7d62;
    flex-shrink: 0;
}

/* Footer */
.about-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.about-footer p {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Legal Links */
.about-legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.about-legal-links a {
    color: #0b7d62;
    text-decoration: none;
    font-weight: 500;
}

.about-legal-links a:hover {
    text-decoration: underline;
}

.about-legal-links span {
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .about-dialog {
        margin: 0;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }
    
    .about-body {
        padding: 24px 20px;
    }
    
    .about-app-title {
        font-size: 1.5rem;
    }
    
    .about-section {
        padding: 16px;
    }
}

/* Prevent body scroll when modal is open */
body:has(#aboutModal.show) {
    overflow: hidden;
}

/* Fallback for browsers that don't support :has() */
body.about-modal-open {
    overflow: hidden;
}