/* ==========================================================================
   AceChange Crypto Points — Public Listing
   Dark theme matching AceChange brand
   ========================================================================== */

:root {
    --ace-gold: #f0b90b;
    --ace-gold-dim: rgba(240, 185, 11, 0.15);
    --ace-gold-glow: rgba(240, 185, 11, 0.35);
    --ace-bg: #0b0e11;
    --ace-bg-card: #1e2329;
    --ace-bg-input: #2b3139;
    --ace-bg-modal: #181a20;
    --ace-border: #2b3139;
    --ace-border-light: #3a4049;
    --ace-text: #eaecef;
    --ace-text-muted: #848e9c;
    --ace-green: #0ecb81;
    --ace-red: #f6465d;
    --ace-blue: #1e90ff;
    --ace-orange: #f0a500;
    --ace-radius: 12px;
    --ace-radius-sm: 8px;
    --ace-transition: 0.2s ease;
}

/* ---- Container ------------------------------------------------------ */

.ace-points {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    color: var(--ace-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
}

/* ---- Header (search + filters) -------------------------------------- */

.ace-points-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ace-bg);
    padding: 16px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ace-border);
}

.ace-points-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--ace-gold);
    margin: 0 0 16px 0;
}

/* ---- Search --------------------------------------------------------- */

.ace-points-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.ace-points-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--ace-text);
    background: var(--ace-bg-input);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius-sm);
    outline: none;
    transition: border-color var(--ace-transition);
}

.ace-points-search-input::placeholder {
    color: var(--ace-text-muted);
}

.ace-points-search-input:focus {
    border-color: var(--ace-gold);
}

.ace-points-locate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ace-bg);
    background: var(--ace-gold);
    border: none;
    border-radius: var(--ace-radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: opacity var(--ace-transition);
}

.ace-points-locate-btn:hover {
    opacity: 0.85;
}

.ace-points-locate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Filters -------------------------------------------------------- */

.ace-points-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}

.ace-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ace-filter-group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ace-text-muted);
}

.ace-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Filter chip — checkbox hidden, label styled */
.ace-chip--filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ace-text-muted);
    background: var(--ace-bg-input);
    border: 1px solid var(--ace-border);
    border-radius: 100px;
    cursor: pointer;
    user-select: none;
    transition: all var(--ace-transition);
}

.ace-chip--filter-input {
    display: none;
}

.ace-chip--filter-input:checked + .ace-chip--filter {
    color: var(--ace-gold);
    border-color: var(--ace-gold);
    background: var(--ace-gold-dim);
}

/* Sort dropdown */
.ace-points-sort {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--ace-text);
    background: var(--ace-bg-input);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius-sm);
    outline: none;
    cursor: pointer;
    transition: border-color var(--ace-transition);
}

.ace-points-sort:focus {
    border-color: var(--ace-gold);
}

/* ---- Layout (map + list) -------------------------------------------- */

.ace-points-layout {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 20px;
    align-items: start;
}

/* ---- Map ------------------------------------------------------------ */

.ace-points-map {
    position: sticky;
    top: 180px;
    min-height: 500px;
    height: calc(100vh - 220px);
    border-radius: var(--ace-radius);
    overflow: hidden;
    border: 1px solid var(--ace-border);
}

/* Custom map marker */
.ace-map-marker-icon {
    background: none;
    border: none;
}

.ace-map-dot {
    display: block;
    width: 14px;
    height: 14px;
    background: var(--ace-gold);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(240, 185, 11, 0.6);
    transition: transform var(--ace-transition), box-shadow var(--ace-transition);
}

.ace-map-marker--active .ace-map-dot {
    transform: scale(1.5);
    box-shadow: 0 0 14px var(--ace-gold-glow);
}

/* ---- List ----------------------------------------------------------- */

.ace-points-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
    position: relative;
}

.ace-points-list--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(11, 14, 17, 0.6);
    border-radius: var(--ace-radius);
    pointer-events: none;
}

.ace-points-count {
    font-size: 14px;
    color: var(--ace-text-muted);
    margin-bottom: 8px;
}

.ace-points-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ace-text-muted);
    font-size: 15px;
}

/* ---- Location Card -------------------------------------------------- */

.ace-point-card {
    background: var(--ace-bg-card);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius);
    padding: 16px;
    cursor: pointer;
    transition: border-color var(--ace-transition), box-shadow var(--ace-transition);
}

.ace-point-card:hover {
    border-color: var(--ace-gold);
    box-shadow: 0 0 16px var(--ace-gold-dim);
}

.ace-point-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ace-point-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.ace-point-card-status {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 100px;
    letter-spacing: 0.3px;
}

.ace-point-card-status--open {
    color: var(--ace-green);
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.ace-point-card-status--closed {
    color: var(--ace-red);
    background: rgba(246, 70, 93, 0.12);
    border: 1px solid rgba(246, 70, 93, 0.3);
}

/* Service chips */
.ace-point-card-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ace-chip {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ace-chip--service {
    color: var(--ace-text);
}

.ace-chip--swap {
    color: var(--ace-gold);
    background: rgba(240, 185, 11, 0.12);
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.ace-chip--buy {
    color: var(--ace-green);
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.ace-chip--sell {
    color: var(--ace-blue);
    background: rgba(30, 144, 255, 0.12);
    border: 1px solid rgba(30, 144, 255, 0.3);
}

.ace-chip--cash {
    color: var(--ace-orange);
    background: rgba(240, 165, 0, 0.12);
    border: 1px solid rgba(240, 165, 0, 0.3);
}

.ace-chip--currency {
    color: var(--ace-text-muted);
    background: var(--ace-bg-input);
    border: 1px solid var(--ace-border);
    font-size: 10px;
}

/* Card currencies row */
.ace-point-card-currencies {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/* Card meta */
.ace-point-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--ace-text-muted);
    margin-bottom: 8px;
}

.ace-point-card-distance {
    color: var(--ace-gold);
    font-weight: 500;
}

.ace-point-card-fee {
    color: var(--ace-text-muted);
}

/* Card rating */
.ace-point-card-rating {
    font-size: 14px;
}

.ace-point-card-review-count {
    font-size: 12px;
    color: var(--ace-text-muted);
}

/* Stars */
.ace-star {
    color: var(--ace-gold);
}

.ace-star--empty {
    color: var(--ace-border-light);
}

.ace-star--half {
    color: var(--ace-gold);
    opacity: 0.6;
}

.ace-stars {
    color: var(--ace-gold);
    letter-spacing: 1px;
}

/* ---- Modal ---------------------------------------------------------- */

.ace-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: aceModalFadeIn 0.2s ease;
}

@keyframes aceModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ace-modal-content {
    position: relative;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--ace-bg-modal);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius);
    padding: 32px;
    animation: aceModalSlideUp 0.25s ease;
}

@keyframes aceModalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.ace-modal-content--large {
    max-width: 800px;
}

.ace-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--ace-text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color var(--ace-transition);
}

.ace-modal-close:hover {
    color: var(--ace-text);
}

.ace-modal-body {
    color: var(--ace-text);
}

body.ace-modal-open {
    overflow: hidden;
}

/* ---- Detail Grid ---------------------------------------------------- */

.ace-detail-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.ace-detail-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.ace-detail-rating {
    margin-bottom: 12px;
    font-size: 16px;
}

.ace-detail-rating span {
    font-size: 13px;
    color: var(--ace-text-muted);
}

.ace-detail-desc {
    font-size: 14px;
    color: var(--ace-text-muted);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.ace-detail-section {
    margin-bottom: 20px;
}

.ace-detail-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ace-text);
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ace-border);
}

/* Sidebar info */
.ace-detail-info {
    margin-bottom: 16px;
}

.ace-detail-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--ace-text-muted);
}

.ace-detail-info a {
    color: var(--ace-gold);
    text-decoration: none;
}

.ace-detail-info a:hover {
    text-decoration: underline;
}

/* Detail small map */
.ace-detail-map {
    width: 100%;
    height: 180px;
    border-radius: var(--ace-radius-sm);
    overflow: hidden;
    border: 1px solid var(--ace-border);
    margin-bottom: 16px;
}

/* Exchange button */
.ace-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--ace-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--ace-transition);
}

.ace-btn--primary {
    color: var(--ace-bg);
    background: var(--ace-gold);
}

.ace-btn--primary:hover {
    opacity: 0.85;
}

.ace-detail-exchange-btn {
    width: 100%;
    text-align: center;
}

/* Stats */
.ace-detail-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.ace-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--ace-bg-input);
    border-radius: var(--ace-radius-sm);
    border: 1px solid var(--ace-border);
    flex: 1;
}

.ace-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--ace-gold);
}

.ace-stat-label {
    font-size: 11px;
    color: var(--ace-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---- Hours Table ---------------------------------------------------- */

.ace-hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ace-hours-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--ace-border);
    color: var(--ace-text-muted);
}

.ace-hours-table td:first-child {
    font-weight: 500;
    color: var(--ace-text);
    width: 120px;
}

.ace-hours-table tr.ace-hours-today td {
    color: var(--ace-gold);
    font-weight: 600;
    background: var(--ace-gold-dim);
}

/* ---- Services Table ------------------------------------------------- */

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

.ace-services-table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--ace-text-muted);
    border-bottom: 1px solid var(--ace-border);
}

.ace-services-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--ace-border);
    color: var(--ace-text-muted);
}

/* ---- Verified Badge ------------------------------------------------- */

.ace-verified-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ace-green);
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.3);
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---- Reviews -------------------------------------------------------- */

.ace-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ace-review-card {
    background: var(--ace-bg-input);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius-sm);
    padding: 14px;
}

.ace-review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ace-review-stars {
    font-size: 14px;
}

.ace-review-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--ace-text);
}

.ace-review-date {
    font-size: 12px;
    color: var(--ace-text-muted);
    margin-left: auto;
}

.ace-review-text {
    font-size: 13px;
    color: var(--ace-text-muted);
    line-height: 1.6;
}

.ace-review-reply {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--ace-text-muted);
    background: var(--ace-bg-card);
    border-radius: var(--ace-radius-sm);
    border-left: 3px solid var(--ace-gold);
}

/* ---- Pagination ----------------------------------------------------- */

.ace-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    padding: 16px 0;
}

.ace-page-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ace-text-muted);
    background: var(--ace-bg-card);
    border: 1px solid var(--ace-border);
    border-radius: var(--ace-radius-sm);
    cursor: pointer;
    transition: all var(--ace-transition);
}

.ace-page-btn:hover {
    border-color: var(--ace-gold);
    color: var(--ace-gold);
}

.ace-page-btn--active {
    color: var(--ace-bg);
    background: var(--ace-gold);
    border-color: var(--ace-gold);
}

/* ---- Responsive ----------------------------------------------------- */

@media (max-width: 768px) {
    .ace-points-layout {
        grid-template-columns: 1fr;
    }

    .ace-points-map {
        position: relative;
        top: auto;
        min-height: 300px;
        height: 300px;
    }

    .ace-points-list {
        max-height: none;
        overflow-y: visible;
    }

    .ace-points-search {
        flex-direction: column;
    }

    .ace-points-filters {
        gap: 10px;
    }

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

    .ace-detail-sidebar {
        order: -1;
    }

    .ace-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    .ace-modal-content--large {
        max-width: 95%;
    }

    .ace-points-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .ace-points {
        padding: 12px 8px;
    }

    .ace-point-card {
        padding: 12px;
    }

    .ace-detail-stats {
        flex-direction: column;
    }
}

/* ---- Scrollbar (webkit) --------------------------------------------- */

.ace-points-list::-webkit-scrollbar {
    width: 6px;
}

.ace-points-list::-webkit-scrollbar-track {
    background: var(--ace-bg);
    border-radius: 3px;
}

.ace-points-list::-webkit-scrollbar-thumb {
    background: var(--ace-border-light);
    border-radius: 3px;
}

.ace-points-list::-webkit-scrollbar-thumb:hover {
    background: var(--ace-text-muted);
}
