/* public/css/mjolo.css - UPDATED WITH CLICKABLE DROPDOWN IMAGES */

/* ========== NAVBAR - ONLY HEIGHT REDUCED ========== */
.navbar {
    padding: 5px 20px !important;
    min-height: 50px !important;
}

.navbar .nav-container {
    padding: 0 !important;
}

.navbar .nav-brand h1 {
    font-size: 20px !important;
    margin: 0 !important;
}

.navbar .nav-link {
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.navbar .nav-right {
    gap: 10px !important;
}

.navbar .token-balance {
    padding: 5px 10px !important;
    font-size: 13px !important;
}

.navbar .btn-logout {
    padding: 5px 12px !important;
    font-size: 13px !important;
}

.nav-profile-btn {
    padding: 3px 8px !important;
}

.profile-menu-avatar {
    width: 30px !important;
    height: 30px !important;
}

/* ========== CONTAINER ========== */
#mjoloContainer {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== HEADER ========== */
.mjolo-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 15px;
    color: white;
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

.mjolo-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.mjolo-header h2 i {
    color: white;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

.mjolo-header p {
    opacity: 0.9;
    margin-bottom: 20px;
    font-size: 16px;
    color: white;
}

.admin-badge {
    background: #9c27b0;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ========== SEARCH SECTION ========== */
.mjolo-search-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.mjolo-search-box {
    position: relative;
    width: 100%;
}

.mjolo-search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-size: 18px;
    z-index: 1;
}

.mjolo-search-box input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
    color: #333;
}

.mjolo-search-box input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.mjolo-search-box input::placeholder {
    color: #999;
}

/* Search filters row */
.mjolo-search-filters {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.mjolo-search-filter {
    flex: 1;
    min-width: 150px;
}

.mjolo-search-filter select,
.mjolo-search-filter input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #333;
}

.mjolo-search-filter select:focus,
.mjolo-search-filter input:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* ========== STATS BAR ========== */
.mjolo-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.mjolo-stats span {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

#mjoloRefreshBtn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

#mjoloRefreshBtn:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* ========== USERS GRID ========== */
.mjolo-users-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* ========== USER CARD ========== */
.mjolo-user-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: cardFadeIn 0.5s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.mjolo-user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(220, 53, 69, 0.15);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slideshow */
.mjolo-card-slideshow {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.mjolo-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.mjolo-card-img.active {
    opacity: 1;
}

.mjolo-slideshow-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 2;
}

.mjolo-slide-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: #dc3545;
    font-weight: bold;
}

.mjolo-slide-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Status Indicator */
.mjolo-card-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.mjolo-card-status.online {
    background: #28a745;
    color: white;
}

.mjolo-card-status.offline {
    background: #6c757d;
    color: white;
}

/* Admin Badge on Card */
.mjolo-card-admin-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #9c27b0;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.mjolo-card-admin-badge i {
    font-size: 10px;
    color: #ffd700;
}

/* Card Content */
.mjolo-card-content {
    padding: 20px;
    flex: 1;
    max-height: 600px;
    overflow-y: auto;
    color: #333;
}

/* Custom scrollbar for card content */
.mjolo-card-content::-webkit-scrollbar {
    width: 5px;
}

.mjolo-card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mjolo-card-content::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 10px;
}

.mjolo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.mjolo-card-name {
    font-size: 22px;
    font-weight: 700;
    color: #dc3545;
    margin: 0;
}

.mjolo-card-age {
    font-size: 16px;
    color: #666;
    font-weight: 600;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Info Rows */
.mjolo-info-row {
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    word-break: break-word;
}

.mjolo-info-row i {
    min-width: 18px;
    color: #dc3545;
    font-size: 14px;
    margin-top: 2px;
}

.mjolo-info-row.love-bed {
    background: #fff0f0;
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 3px solid #dc3545;
    color: #721c24;
}

.mjolo-info-row.dealbreakers {
    background: #fff3cd;
    padding: 8px 10px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    color: #856404;
}

.whatsapp-preview {
    font-family: monospace;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #075e54;
}

/* Details Grid */
.mjolo-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.mjolo-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
}

.mjolo-detail-item i {
    color: #dc3545;
    font-size: 12px;
}

/* Bio Section */
.mjolo-bio {
    margin: 15px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    border-left: 3px solid #dc3545;
}

.mjolo-bio i {
    color: #dc3545;
    margin-right: 8px;
}

/* Preferences and Turnoffs */
.mjolo-preferences,
.mjolo-turnoffs {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
}

.mjolo-preferences {
    background: #d4edda;
    color: #155724;
}

.mjolo-turnoffs {
    background: #f8d7da;
    color: #721c24;
}

.pref-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pref-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pref-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.pref-tag.pref {
    background: #28a745;
    color: white;
}

.pref-tag.turnoff {
    background: #dc3545;
    color: white;
}

/* Stats */
.mjolo-card-stats {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    padding: 10px 0;
}

.mjolo-card-stats span {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mjolo-card-stats i {
    color: #dc3545;
}

/* WhatsApp Section */
.mjolo-whatsapp-section {
    margin: 15px 0;
    padding: 12px;
    background: #f0f9f0;
    border-radius: 8px;
    border: 1px solid #25D366;
}

.mjolo-whatsapp-display {
    background: #25D366;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-all;
    font-family: monospace;
    font-size: 14px;
}

.mjolo-whatsapp-display i {
    font-size: 18px;
    color: white;
}

.mjolo-whatsapp-toggle {
    width: 100%;
    padding: 10px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.mjolo-whatsapp-toggle:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Action Buttons - Only Match Button */
.mjolo-card-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.mjolo-action-btn.match {
    width: 100%;
    padding: 14px 0;
    background: #9c27b0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.mjolo-action-btn.match:hover {
    background: #7b1fa2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
}

/* ========== MATCH DROPDOWN STYLES ========== */
.match-user-dropdown {
    position: absolute;
    width: 450px;
    max-width: 95vw;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    z-index: 10000;
    animation: dropdownSlide 0.2s ease;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.match-user-dropdown.top {
    transform-origin: bottom center;
}

.match-user-dropdown.bottom {
    transform-origin: top center;
}

.match-user-dropdown.left {
    transform-origin: right center;
}

.match-user-dropdown.right {
    transform-origin: left center;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dropdown header */
.match-dropdown-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.match-dropdown-header h4 i {
    color: #ffd700;
}

.close-dropdown-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-dropdown-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Dropdown search */
.match-dropdown-search {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.match-dropdown-search input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    color: #333;
}

.match-dropdown-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dropdown content - scrollable */
.match-dropdown-content {
    max-height: 450px;
    overflow-y: auto;
    padding: 15px;
}

/* Custom scrollbar for dropdown */
.match-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.match-dropdown-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.match-dropdown-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

/* Individual match items - WITH CLICKABLE IMAGES */
.match-item {
    display: flex;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    background: white;
    position: relative;
}

.match-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
}

/* BIGGER SQUARE IMAGES FOR DROPDOWN - WITH ZOOM CURSOR */
.match-item-img {
    width: 100px !important;
    height: 100px !important;
    border-radius: 12px !important;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #667eea;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    cursor: zoom-in !important; /* Shows zoom cursor */
    transition: transform 0.2s, box-shadow 0.2s;
}

.match-item-img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.match-item-info {
    flex: 1;
    min-width: 0;
    cursor: pointer; /* Shows clickable cursor for the whole item */
}

.match-item-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.match-item-details {
    font-size: 13px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.match-item-details span {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.match-item-details i {
    width: 16px;
    color: #667eea;
    font-size: 13px;
    flex-shrink: 0;
}

.match-item-age {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
    color: #333;
}

.match-item-status.online i {
    color: #28a745;
}

.match-item-status.offline i {
    color: #6c757d;
}

.match-item-likes {
    color: #dc3545;
    font-weight: 600;
}

.match-item-preferences {
    color: #28a745;
    background: #f0f9f0;
    padding: 4px 10px;
    border-radius: 15px;
    width: fit-content;
}

.match-item-turnoffs {
    color: #dc3545;
    background: #fff0f0;
    padding: 4px 10px;
    border-radius: 15px;
    width: fit-content;
}

/* Loading state in dropdown */
.match-dropdown-loading {
    padding: 40px;
    text-align: center;
    color: #666;
}

.match-dropdown-loading i {
    font-size: 40px;
    color: #667eea;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

/* No results in dropdown */
.match-dropdown-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.match-dropdown-empty i {
    font-size: 50px;
    color: #999;
    margin-bottom: 15px;
}

/* Dropdown footer */
.match-dropdown-footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 13px;
    color: #666;
    background: #fafafa;
    font-weight: 600;
}

/* ========== IMAGE ZOOM MODAL ========== */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    cursor: zoom-out;
}

.image-zoom-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-zoom-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.image-zoom-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.image-zoom-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.image-zoom-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 16px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 30px;
    width: fit-content;
    margin: 0 auto;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Users / Error States */
.no-users, .error-message {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    grid-column: 1 / -1;
}

.no-users i, .error-message i {
    font-size: 60px;
    color: #dc3545;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-spinner i {
    font-size: 40px;
    color: #dc3545;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

/* Load More Button */
#mjoloLoadMoreContainer {
    text-align: center;
    margin: 30px 0;
}

.btn-load-more {
    background: white;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
}

/* Back Button */
#backToDiscover {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

#backToDiscover:hover {
    background: white;
    color: #dc3545;
}

/* Notifications */
.mjolo-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.mjolo-notification.success {
    background: #28a745;
}

.mjolo-notification.error {
    background: #dc3545;
}

.mjolo-notification.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mjolo-search-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .mjolo-search-filter {
        width: 100%;
    }
    
    .mjolo-users-container {
        grid-template-columns: 1fr;
    }
    
    .match-user-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 95%;
        max-width: 420px;
        max-height: 80vh;
    }
    
    .match-item-img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .image-zoom-close {
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.5);
    }
    
    .image-zoom-caption {
        bottom: 10px;
        font-size: 14px;
    }
    
    /* Keep navbar height reduced on mobile */
    .navbar {
        padding: 3px 10px !important;
    }
    
    .navbar .nav-brand h1 {
        font-size: 18px !important;
    }
}