/* AnyDoor VPN — custom styles on top of Tailwind */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Nav links */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: 0.5rem;
    transition: all 0.2s;
}
.nav-link:hover {
    color: #00ccb6;
    background: rgba(0, 229, 204, 0.05);
}

/* Admin tabs */
.admin-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.admin-tab:hover {
    color: #00ccb6;
    background: rgba(0, 229, 204, 0.05);
}
.admin-tab.active {
    color: #00a396;
    background: #eefffe;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Copy button feedback */
.copy-success {
    animation: copyPulse 0.5s ease-out;
}
@keyframes copyPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: #1f2937;
    color: white;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* PWA safe areas */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Mobile touch targets — min 44px */
@media (max-width: 640px) {
    .nav-link, .admin-tab {
        padding: 0.625rem 0.875rem;
        min-height: 44px;
    }
    button, [type="submit"], a.inline-flex {
        min-height: 44px;
    }
    input, select, textarea {
        font-size: 16px !important; /* prevent iOS zoom on focus */
    }
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Standalone PWA mode tweaks */
@media (display-mode: standalone) {
    nav.sticky {
        padding-top: env(safe-area-inset-top);
    }
}

/* Prevent text selection on buttons */
button, .tariff-card {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth transitions for mobile */
* {
    -webkit-tap-highlight-color: transparent;
}
