/* ============================================
   MATCHES TAB — extracted from matches.js
   ✅ Replaces ~92 inline style="" attributes
   ============================================ */

/* --- Banner Ad Container --- */
.matches-banner-ad {
    width: 100%;
    min-height: 60px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    border-radius: 0.5rem;
}

/* --- Page Header --- */
.matches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.matches-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-vanilla, #FDFAB0);
    margin: 0;
}

/* --- Notification Panel --- */
.notification-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-vanilla, #FDFAB0);
    margin: 0;
}

.notification-close-btn {
    background: transparent;
    border: none;
    color: var(--color-powder, #A6C0DD);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
}

.notification-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-powder, #A6C0DD);
}

.notification-empty-icon {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
}

.notification-empty-text {
    font-size: 0.75rem;
}

/* --- Taste Profile Section --- */
.taste-section {
    margin-bottom: 1rem;
    overflow: hidden;
    padding: 0.75rem;
}

.taste-header {
    padding: 0;
}

.taste-summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--color-powder, #A6C0DD);
}

.taste-expand-icon {
    color: var(--color-powder, #A6C0DD);
    font-size: 1rem;
}

.taste-content {
    display: none;
    padding: 0.75rem 0 0 0;
}

/* --- Action Buttons Row (Link / Create / Join) --- */
.connections-card {
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.action-buttons-row {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.compact-action-btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.75rem;
}

.action-btn-icon {
    font-size: 0.875rem;
}

/* --- Connections Scroll --- */
.connections-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connections-scroll {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.375rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.connection-items {
    display: flex;
    gap: 0.5rem;
    min-width: min-content;
}

.compact-search-btn {
    padding: 0.5rem;
}

.search-btn-icon {
    font-size: 1rem;
}

/* --- Filter Tabs --- */
.filter-tabs-container {
    display: none;
    margin-bottom: 1rem;
}

.filter-tabs-inner {
    display: flex;
    gap: 0.375rem;
    background: rgba(166, 192, 221, 0.1);
    padding: 0.375rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(166, 192, 221, 0.2);
}

.filter-tab {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
}

/* --- Action Buttons Toolbar --- */
.action-buttons-section {
    display: none;
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
}

/* --- Matches Display --- */
.matches-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-vanilla, #FDFAB0);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-count-label {
    font-size: 0.75rem;
    color: var(--color-powder, #A6C0DD);
    font-weight: 500;
}

/* --- Empty State --- */
.matches-empty-state {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-powder, #A6C0DD);
}

.matches-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.matches-empty-title {
    color: var(--color-vanilla, #FDFAB0);
    margin-bottom: 0.5rem;
}

/* --- Match Card (grid item) --- */
.match-card-item {
    position: relative;
}

/* --- Room Detail Modal --- */
.room-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fade-in 0.3s ease-out;
}

.room-modal-card {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(24, 24, 58, 0.98), rgba(15, 15, 38, 0.98));
    border: 2px solid rgba(166, 192, 221, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slide-up 0.4s ease-out;
}

.room-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.room-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-vanilla, #FDFAB0);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.room-modal-title-icon {
    font-size: 1.75rem;
}

.room-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(166, 192, 221, 0.2);
    border: 2px solid rgba(166, 192, 221, 0.3);
    color: var(--color-vanilla, #FDFAB0);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 700;
}

.room-modal-close:hover {
    background: rgba(166, 192, 221, 0.3);
}

/* --- Room Code Display --- */
.room-code-section {
    background: linear-gradient(135deg, rgba(166, 192, 221, 0.15), rgba(253, 250, 176, 0.1));
    border: 2px solid rgba(166, 192, 221, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.room-code-label {
    color: var(--color-powder, #A6C0DD);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

.room-code-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-vanilla, #FDFAB0);
    letter-spacing: 0.5rem;
    font-family: monospace;
}

.room-code-hint {
    color: rgba(166, 192, 221, 0.7);
    font-size: 0.75rem;
    margin: 0.5rem 0 0 0;
}

/* --- Room Info Grid --- */
.room-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.room-info-cell {
    background: rgba(166, 192, 221, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.room-info-label {
    color: var(--color-powder, #A6C0DD);
    font-size: 0.75rem;
    margin: 0;
}

.room-info-value {
    color: var(--color-vanilla, #FDFAB0);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 0 0;
}

/* --- Room Action Buttons --- */
.room-actions {
    display: flex;
    gap: 1rem;
}

.room-btn-primary {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.room-btn-primary:active {
    transform: scale(0.97);
}

.room-btn-copy {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.room-btn-matches {
    background: linear-gradient(135deg, #10b981, #059669);
    font-weight: 700;
}

.room-btn-danger {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.room-btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* --- Create Room Modal --- */
.create-room-modal-card {
    max-width: 420px;
    width: 100%;
    padding: 2rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(24, 24, 58, 0.98), rgba(15, 15, 38, 0.98));
    border: 2px solid rgba(166, 192, 221, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slide-up 0.4s ease-out;
}

/* --- Form Fields --- */
.room-form-group {
    margin-bottom: 1.25rem;
}

.room-form-label {
    display: block;
    color: var(--color-powder, #A6C0DD);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.room-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(166, 192, 221, 0.1);
    border: 2px solid rgba(166, 192, 221, 0.2);
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.room-form-input:focus {
    border-color: rgba(253, 250, 176, 0.5);
}

/* --- Duration Options Grid --- */
.duration-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.duration-option {
    padding: 1rem;
    background: rgba(166, 192, 221, 0.1);
    border: 2px solid rgba(166, 192, 221, 0.2);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: var(--color-powder, #A6C0DD);
}

.duration-option:hover,
.duration-option.selected {
    border-color: rgba(253, 250, 176, 0.5);
    background: rgba(253, 250, 176, 0.1);
}

.duration-option-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.duration-option-label {
    font-weight: 700;
    font-size: 0.875rem;
}

.duration-option-desc {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* --- Create Room Confirm Button --- */
.room-create-confirm {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.room-create-confirm:active {
    transform: scale(0.98);
}

/* --- Room Matches Empty --- */
.room-matches-empty {
    text-align: center;
    padding: 2rem;
}

.room-matches-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.room-matches-empty-title {
    color: var(--color-vanilla, #FDFAB0);
    margin: 0 0 0.5rem 0;
}

.room-matches-empty-text {
    margin: 0;
    font-size: 0.875rem;
}

/* --- Error State --- */
.matches-error {
    text-align: center;
    padding: 2rem;
    color: var(--color-powder, #A6C0DD);
}

/* --- Scrolling loading indicator --- */
.connections-loading {
    color: var(--color-powder, #A6C0DD);
    font-size: 0.875rem;
    padding: 1rem;
    white-space: nowrap;
}

/* --- Grid error cell --- */
.matches-grid-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #ef4444;
}

/* --- Connection Item Overlay Buttons (report / room info) --- */
.connection-overlay-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: transparent;
    border: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    max-height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    z-index: 5;
}

.report-user-btn {
    color: rgba(239, 68, 68, 0.5);
}

.report-user-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.room-info-btn {
    color: rgba(166, 192, 221, 0.6);
}

.room-info-btn:hover {
    color: var(--color-vanilla, #FDFAB0);
    background: rgba(253, 250, 176, 0.15);
}

/* --- Room Matches Empty (full-width grid cell) --- */
.room-matches-empty-cell {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-powder, #A6C0DD);
}
