/* ============================================
   Master Calculator - Common Styles
   ============================================ */

/* Base Styles - fonts apply site-wide including splash */
html {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    min-height: max(884px, 100dvh);
}

/* Material Icons */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Common Utilities */
.ios-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

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

.ios-blur {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Bento Card Animation */
.bento-card {
    transition: transform 0.1s ease-in-out, background-color 0.2s ease;
}

.bento-card:active {
    transform: scale(0.96);
    background-color: rgba(0, 204, 204, 0.05);
}

/* Calculator Button Styles */
.calculator-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Form Input Focus */
.form-input:focus {
    outline: none !important;
    ring: 0 !important;
}

/* Active Tool Glow */
.active-tool-glow {
    box-shadow: 0 0 15px rgba(0, 204, 204, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
}

/* Animation Classes */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoom-in {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1);
    }
}

.animate-in {
    animation: fade-in 0.7s ease-out;
}

.fade-in {
    animation: fade-in 0.7s ease-out;
}

.zoom-in {
    animation: zoom-in 0.7s ease-out;
}

/* Search Suggestions */
#search-suggestions {
    animation: fade-in 0.2s ease-out;
}

#search-suggestions a:focus {
    outline: none;
    background-color: rgba(0, 204, 204, 0.1);
}

#search-suggestions a:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

#search-suggestions a:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 204, 204, 0.3);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 204, 204, 0.5);
}

/* Products Dropdown - Solid Background */
.products-dropdown {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.dark .products-dropdown {
    background-color: #1f2937 !important;
}

/* Mobile Menu - Solid Background */
#mobile-menu {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.dark #mobile-menu {
    background-color: #1f2937 !important;
}

/* Search Suggestions - Solid Background */
#search-suggestions {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.dark #search-suggestions {
    background-color: #1f2937 !important;
}

/* Products Dropdown Responsive */
@media (max-width: 768px) {
    .products-dropdown {
        width: calc(100vw - 2rem) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Header Gradient Border */
header {
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, rgba(0, 204, 204, 0.2), rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
}

/* Animation Delays */
@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

.delay-1000 {
    animation-delay: 1s;
}

.delay-2000 {
    animation-delay: 2s;
}

.animate-pulse {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Home Page Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Dropdown Styling */
select {
    background-image: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select option {
    background-color: #ffffff;
    color: #1f2937;
    padding: 12px;
}

html.dark select option {
    background-color: #1f2937;
    color: #ffffff;
}

select:focus option:checked {
    background-color: rgba(0, 204, 204, 0.1);
    color: #00cccc;
}

/* ============================================
   jQuery Validate - Common Form Validation UI
   ============================================ */
.mc-error {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    color: #dc2626; /* red-600 */
}

html.dark .mc-error {
    color: #fca5a5; /* red-300 */
}

.mc-invalid {
    border-color: #ef4444 !important; /* red-500 */
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
}

.mc-valid {
    border-color: rgba(0, 204, 204, 0.6) !important;
}
