/* WarpIt V2 - Custom styles (supplement Tailwind CDN) */

/* Smooth defaults */
*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Form input baseline (Tailwind CDN doesn't include forms plugin) */
input[type="text"],
input[type="email"],
input[type="password"],
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,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Portal theme CSS custom properties */
:root {
    --portal-primary: #4f46e5;
    --portal-primary-hover: #4338ca;
    --portal-accent: #6366f1;
}

/* Textile Exchange theme */
.theme-textiles {
    --portal-primary: #4338ca;
    --portal-primary-hover: #3730a3;
    --portal-accent: #6366f1;
}

/* --- Navigation --- */

#main-nav {
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}

/* Nav link base style */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    border-radius: 0.375rem;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.nav-link:hover {
    color: #4f46e5;
    background-color: #eef2ff;
}

/* Dropdown container */
.nav-dropdown {
    position: relative;
}

/* Dropdown menu (hidden by default) */
.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); }
}

/* Show dropdown when open */
.nav-dropdown.open > .dropdown-menu {
    display: block;
}

/* Dropdown item */
.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: #eef2ff;
    color: #4f46e5;
}

/* --- 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: #eef2ff;
    color: #4f46e5;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.15s ease;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25), 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: #111827;
    color: #9ca3af;
    padding: 2rem 0;
    margin-top: 3rem;
    font-size: 0.8125rem;
}
.portal-footer a {
    color: #d1d5db;
    transition: color 0.15s;
}
.portal-footer a:hover {
    color: #818cf8;
}
