/* Geomind MOS Bootstrap - Technical Elegance Theme */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --gm-purple: #6E7CFF;
    --gm-purple-light: #8B96FF;
    --gm-purple-dark: #5563E8;
    --gm-indigo: #555DB7;
    --gm-lavender: #7A88F7;
    --gm-aqua: #78D7FF;
    --gm-mint: #7CFCD1;
    --gm-navy: #0E172A;
    --gm-ink: #091021;
    --gm-mist: #F9FAFC;
    --gm-slate: #E2E8F0;

    color-scheme: light dark;
}

/* ============================================
   Base Styles
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Selection */
::selection {
    background-color: rgba(110, 124, 255, 0.2);
}

.dark ::selection {
    background-color: rgba(110, 124, 255, 0.3);
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--gm-purple);
    outline-offset: 2px;
}

/* Cloak for Alpine.js */
[x-cloak] {
    display: none !important;
}

/* ============================================
   Typography
   ============================================ */
code, pre {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ============================================
   Form Components
   ============================================ */

/* Form group container */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Labels */
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: rgba(14, 23, 42, 0.5);
}

.dark .form-label {
    color: rgba(249, 250, 252, 0.4);
}

/* Input base styles */
.form-input,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(14, 23, 42, 0.1);
    background-color: rgba(14, 23, 42, 0.02);
    color: var(--gm-navy);
    font-size: 0.8125rem;
    line-height: 1.4;
    transition: all 0.15s ease;
}

.dark .form-input,
.dark .form-select {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--gm-mist);
}

.form-input::placeholder {
    color: rgba(14, 23, 42, 0.35);
}

.dark .form-input::placeholder {
    color: rgba(249, 250, 252, 0.3);
}

.form-input:hover,
.form-select:hover {
    border-color: rgba(14, 23, 42, 0.2);
}

.dark .form-input:hover,
.dark .form-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gm-purple);
    box-shadow: 0 0 0 3px rgba(110, 124, 255, 0.1);
}

/* Select specific */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236E7CFF' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background-color: white;
    color: var(--gm-navy);
}

.dark .form-select option {
    background-color: var(--gm-navy);
    color: var(--gm-mist);
}

/* Checkbox */
.form-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(14, 23, 42, 0.2);
    background-color: transparent;
    cursor: pointer;
    accent-color: var(--gm-purple);
}

.dark .form-checkbox {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-checkbox:checked {
    background-color: var(--gm-purple);
    border-color: var(--gm-purple);
}

/* Hint text */
.form-hint {
    font-size: 0.75rem;
    color: rgba(14, 23, 42, 0.4);
    margin-top: 0.25rem;
}

.dark .form-hint {
    color: rgba(249, 250, 252, 0.35);
}

/* ============================================
   Buttons
   ============================================ */

/* Primary button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    background-color: var(--gm-purple);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(110, 124, 255, 0.25);
}

.btn-primary:hover {
    background-color: var(--gm-purple-light);
    box-shadow: 0 6px 20px rgba(110, 124, 255, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(110, 124, 255, 0.2);
}

/* Ghost button */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: inherit;
    font-weight: 500;
    color: var(--gm-purple);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    background-color: rgba(110, 124, 255, 0.1);
}

/* ============================================
   Cards
   ============================================ */
.result-card {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(14, 23, 42, 0.08);
    background-color: white;
}

.dark .result-card {
    border-color: rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.02);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(110, 124, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 124, 255, 0.35);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(110, 124, 255, 0.2) transparent;
}

/* ============================================
   Animations
   ============================================ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Smooth page transitions */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 640px) {
    .form-input,
    .form-select {
        font-size: 1rem; /* Prevent zoom on iOS */
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .btn-primary,
    .btn-ghost,
    header {
        display: none !important;
    }
}
