﻿@import 'tokens.css';



/* Global Scrollbar Hiding */
*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: sans-serif;
    font-size: 15px;
    transition: all 0.3s;
}

/* Slower view transitions */
::view-transition-group(*) {
    animation-duration: 0.6s;
}

.glass-header {
    background: var(--bg-header);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 50;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
}

.input-field {
    width: 100%;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.2s;
}

.input-field:focus {
    border-color: var(--border-focus);
}

.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-bg.open {
    display: flex;
}

.modal-content {
    width: 95%;
    max-width: 500px;
    border-radius: 1.5rem;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: var(--bg-modal);
    border: 1px solid var(--border-subtle);
}

body:not(.dark) .modal-content {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    padding: 1.5rem;
    /* Standard comfortable padding */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (min-width: 1024px) {

    #app-container,
    header>div,
    nav>div {
        width: 80% !important;
        max-width: 80% !important;
        margin: 0 auto;
    }

    body {
        font-size: 14px;
    }

    .grid-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .input-field {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

.tab-active {
    color: var(--action-primary);
}

.tab-inactive {
    color: var(--text-secondary);
}

details>summary {
    list-style: none;
}

details>summary::-webkit-details-marker {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-slate-300);
    transition: .4s;
    border-radius: 34px;
}

body.dark .slider {
    background-color: var(--color-slate-700);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--action-primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.chip {
    padding: 0.75rem 1.25rem;
    border-radius: 99px;
    border: 2px solid transparent;
    background: var(--bg-chip);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    margin: 2px;
}

.chip.selected {
    background: var(--action-chip-selected);
    color: var(--text-inverted);
    border-color: var(--action-chip-selected);
}

.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 12px 28px;
    border-radius: 99px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
    pointer-events: none;
    font-weight: bold;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body:not(.dark) button.bg-slate-100 {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

body:not(.dark) button.bg-slate-200 {
    background-color: #e2e8f0;
    color: #1e293b;
}

.tab-btn {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.tab-btn.active {
    color: var(--action-primary);
}

body:not(.dark) .tab-btn.active {
    color: var(--action-primary);
}

/* Contact List Details */
/* details.contact-card > summary rules removed as we use div now */

.contact-card.open>div:first-child {
    background-color: var(--bg-input);
}

@media (prefers-color-scheme: dark) {
    .contact-card.open>div:first-child {
        background-color: rgba(51, 65, 85, 0.5);
    }
}