/* WarpIt V2 - Custom styles (supplement Tailwind CDN) */

/* Smooth defaults */
*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Portal theme CSS custom properties (defaults, overridden per-portal in <style> block) */
:root {
    --portal-primary: #4f46e5;
    --portal-primary-hover: #4338ca;
    --portal-primary-light: #eef2ff;
    --portal-secondary: #10b981;
    --portal-secondary-hover: #059669;
    --portal-accent: #f59e0b;
    --portal-nav-bg: #ffffff;
    --portal-nav-text: #374151;
    --portal-footer-bg: #111827;
    --portal-footer-text: #9ca3af;
}

/* Form input baseline (Tailwind CDN doesn't include forms plugin) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="color"],
textarea,
select {
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* --- Navigation --- */

#main-nav {
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(8px);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--portal-nav-text);
    border-radius: 0.375rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.nav-link:hover {
    color: var(--portal-primary);
    background-color: var(--portal-primary-light);
}

/* Dropdown container */
.nav-dropdown { position: relative; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 13rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    padding: 0.375rem;
    z-index: 60;
    animation: dropdownIn 0.15s ease-out;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown.open > .dropdown-menu { display: block; }

.dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: #374151;
    white-space: nowrap;
    border-radius: 0.375rem;
    transition: all 0.1s ease;
}
.dropdown-item:hover {
    background-color: var(--portal-primary-light);
    color: var(--portal-primary);
}

/* --- Mobile menu --- */

.mobile-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}
.mobile-section-title {
    padding: 0.375rem 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}
.mobile-link {
    display: block;
    padding: 0.625rem 1rem 0.625rem 1.5rem;
    font-size: 0.875rem;
    color: #374151;
    border-radius: 0 0.5rem 0.5rem 0;
    margin-right: 0.5rem;
    transition: all 0.1s ease;
}
.mobile-link:hover {
    background-color: var(--portal-primary-light);
    color: var(--portal-primary);
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-hover));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.15s ease;
}
.btn-primary:hover {
    filter: brightness(0.9);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* --- Cards --- */
.card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
}
.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -4px rgba(0,0,0,0.04);
    border-color: #e5e7eb;
}

/* --- Footer --- */
.portal-footer {
    background: var(--portal-footer-bg);
    color: var(--portal-footer-text);
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 0.8125rem;
}
.portal-footer a {
    color: var(--portal-footer-text);
    opacity: 0.8;
    transition: opacity 0.15s;
}
.portal-footer a:hover {
    opacity: 1;
    color: white;
}

/* --- Portal-themed overrides for Tailwind inline classes --- */
/* These allow bg-portal-primary etc. to work via Tailwind config */
.bg-portal-primary { background-color: var(--portal-primary) !important; }
.bg-portal-primary-hover:hover { background-color: var(--portal-primary-hover) !important; }
.bg-portal-primary-light { background-color: var(--portal-primary-light) !important; }
.bg-portal-secondary { background-color: var(--portal-secondary) !important; }
.bg-portal-secondary-hover:hover { background-color: var(--portal-secondary-hover) !important; }
.text-portal-primary { color: var(--portal-primary) !important; }
.text-portal-secondary { color: var(--portal-secondary) !important; }
.border-portal-primary { border-color: var(--portal-primary) !important; }
.ring-portal-primary { --tw-ring-color: var(--portal-primary) !important; }
