/* Amethyst Theme Styles - Premium Dark Violet */

:root {
    --amethyst-bg: #0f0a1a;
    --amethyst-bg-alt: #1a1128;
    --amethyst-card: #1e1530;
    --amethyst-card-hover: #261c3d;
    --amethyst-border: #2d2247;
    --amethyst-text: #f0eaf8;
    --amethyst-text-secondary: #b8a9d4;
    --amethyst-primary: #8b5cf6;
    --amethyst-primary-hover: #7c3aed;
    --amethyst-primary-light: #a78bfa;
    --amethyst-accent: #c4b5fd;
    --amethyst-success: #34d399;
    --amethyst-danger: #f87171;
    --amethyst-warning: #fbbf24;
}

/* CRITICAL: Footer always at bottom - must be loaded last */
html {
    margin: 0 !important;
    padding: 0 !important;
}

html body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--amethyst-bg) !important;
    color: var(--amethyst-text);
}

/* Header should not grow */
html body > nav,
html body > header {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* ============================================
   AMETHYST HEADER - Purple tinted background
   ============================================ */
nav.bg-gray-800 {
    background: linear-gradient(135deg, rgba(25, 15, 42, 0.98), rgba(20, 12, 35, 0.98), rgba(30, 18, 48, 0.98)) !important;
    border-bottom: none !important;
    position: relative;
}

/* Purple accent line under header */
nav.bg-gray-800::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #6d28d9, #8b5cf6, #a78bfa, #8b5cf6, #6d28d9);
}

/* Nav link hover glow */
nav a:hover {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

html body > main {
    flex: 1 0 auto !important;
    background: var(--amethyst-bg) !important;
    padding-bottom: 2rem;
    position: relative;
}

/* Subtle purple glow at top of main content */
html body > main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Footer always at bottom - CRITICAL */
html body > footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    margin-top: auto !important;
    width: 100% !important;
}

body > footer {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* ============================================
   AMETHYST GLOBAL ACCENTS
   ============================================ */
/* Dropdown menus get purple tinted background */
nav .absolute {
    background: linear-gradient(135deg, rgba(25, 15, 42, 0.98), rgba(20, 12, 35, 0.98)) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.08) !important;
}

/* Dropdown hover items get purple accent */
nav .absolute a:hover,
nav .hover\:bg-gray-600:hover {
    background: rgba(139, 92, 246, 0.2) !important;
}

/* Links get purple color */
a.text-blue-400,
a.text-blue-500,
.text-primary-600,
.dark\:text-primary-500 {
    color: var(--amethyst-primary-light) !important;
}

/* ============================================
   BACKGROUND OVERRIDES - Gray to Violet
   ============================================ */
.bg-gray-900 {
    background-color: var(--amethyst-bg) !important;
}

.bg-gray-800 {
    background-color: var(--amethyst-card) !important;
}

.bg-gray-700 {
    background-color: var(--amethyst-card-hover) !important;
}

.bg-gray-200 {
    background-color: var(--amethyst-card) !important;
}

.hover\:bg-gray-600:hover,
.hover\:bg-gray-700:hover {
    background-color: var(--amethyst-card-hover) !important;
}

/* Border overrides - purple tinted */
.border-gray-700,
.border-gray-600 {
    border-color: rgba(139, 92, 246, 0.15) !important;
}

.border-gray-800 {
    border-color: rgba(139, 92, 246, 0.1) !important;
}

/* ============================================
   ACCENT COLOR OVERRIDES - Blue to Purple
   ============================================ */
.bg-blue-600,
.bg-blue-700 {
    background-color: var(--amethyst-primary) !important;
}

.bg-blue-500 {
    background-color: var(--amethyst-primary) !important;
}

.bg-blue-400 {
    background-color: #7c3aed !important;
}

.hover\:bg-blue-700:hover,
.hover\:bg-blue-600:hover,
.hover\:bg-blue-800:hover {
    background-color: var(--amethyst-primary-hover) !important;
}

.dark\:bg-blue-600 {
    background-color: var(--amethyst-primary) !important;
}

.dark\:hover\:bg-blue-700:hover {
    background-color: var(--amethyst-primary-hover) !important;
}

.dark\:focus\:ring-blue-800:focus {
    --tw-ring-color: rgba(139, 92, 246, 0.5) !important;
}

.text-blue-400,
.text-blue-500 {
    color: var(--amethyst-primary-light) !important;
}

.text-blue-300 {
    color: var(--amethyst-accent) !important;
}

.text-blue-600,
.text-blue-700 {
    color: var(--amethyst-primary) !important;
}

.hover\:text-blue-300:hover {
    color: var(--amethyst-accent) !important;
}

.hover\:text-blue-400:hover {
    color: var(--amethyst-primary-light) !important;
}

.border-blue-600,
.border-blue-500 {
    border-color: var(--amethyst-primary) !important;
}

.focus\:ring-blue-500:focus,
.focus\:ring-blue-300:focus {
    --tw-ring-color: rgba(139, 92, 246, 0.5) !important;
}

.focus\:border-blue-500:focus {
    border-color: var(--amethyst-primary) !important;
}

.bg-blue-900\/50 {
    background-color: rgba(91, 33, 182, 0.5) !important;
}

.ring-blue-500 {
    --tw-ring-color: var(--amethyst-primary) !important;
}

/* Additional blue shade overrides */
.bg-blue-50,
.bg-blue-100 {
    background-color: rgba(139, 92, 246, 0.1) !important;
}

.bg-blue-900 {
    background-color: rgba(139, 92, 246, 0.15) !important;
}

.dark\:bg-blue-900 {
    background-color: rgba(139, 92, 246, 0.15) !important;
}

.hover\:bg-blue-500:hover {
    background-color: var(--amethyst-primary-hover) !important;
}

.text-blue-100,
.text-blue-200 {
    color: #e9d5ff !important;
}

.text-blue-800 {
    color: var(--amethyst-primary) !important;
}

.hover\:text-blue-800:hover {
    color: var(--amethyst-primary) !important;
}

.border-blue-200,
.border-blue-400 {
    border-color: rgba(139, 92, 246, 0.3) !important;
}

.border-blue-700,
.border-blue-800 {
    border-color: rgba(139, 92, 246, 0.4) !important;
}

/* Gradient overrides */
.from-blue-600,
.from-blue-500,
.from-blue-700 {
    --tw-gradient-from: #7c3aed !important;
}

.to-purple-600 {
    --tw-gradient-to: #6d28d9 !important;
}

.to-blue-800 {
    --tw-gradient-to: #5b21b6 !important;
}

/* ============================================
   CARDS
   ============================================ */
.theme-card {
    background: var(--amethyst-card);
    border: 1px solid var(--amethyst-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.theme-card:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}

/* ============================================
   BUTTONS
   ============================================ */
.theme-button {
    background: var(--amethyst-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-button:hover {
    background: var(--amethyst-primary-hover);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* ============================================
   ACCOUNT PAGES
   ============================================ */
.account-page {
    padding: 2rem 0;
}

.account-card {
    background: var(--amethyst-card);
    border: 1px solid var(--amethyst-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.account-card h1,
.account-card h2 {
    color: var(--amethyst-text);
    margin-bottom: 1rem;
}

.account-card p {
    color: var(--amethyst-text-secondary);
}

.account-card a {
    color: var(--amethyst-primary-light) !important;
}

.account-card a:hover {
    color: var(--amethyst-primary) !important;
}

/* ============================================
   FORMS
   ============================================ */
.theme-input {
    background: var(--amethyst-card);
    border: 1px solid var(--amethyst-border);
    color: var(--amethyst-text);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
}

.theme-input:focus {
    outline: none;
    border-color: var(--amethyst-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4);
}

/* ============================================
   TABLES
   ============================================ */
.theme-table {
    width: 100%;
    border-collapse: collapse;
}

.theme-table th,
.theme-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--amethyst-border);
    color: var(--amethyst-text);
}

.theme-table th {
    background: var(--amethyst-card);
    font-weight: 600;
    color: var(--amethyst-text);
}

.theme-table tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ============================================
   PROSE
   ============================================ */
.prose i {
    margin-right: 0.25rem;
}

.prose {
    color: var(--amethyst-text-secondary);
}

.prose h1, .prose h2, .prose h3 {
    color: var(--amethyst-text);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: linear-gradient(135deg, rgba(25, 15, 42, 0.98), rgba(20, 12, 35, 0.98), rgba(30, 18, 48, 0.98)) !important;
    border-top: none !important;
    color: var(--amethyst-text-secondary) !important;
    position: relative;
}

/* Purple accent line above footer */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #6d28d9, #8b5cf6, #a78bfa, #8b5cf6, #6d28d9);
}

footer a {
    color: var(--amethyst-text-secondary) !important;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--amethyst-primary-light) !important;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* ============================================
   TEXT COLOR FIXES
   ============================================ */
.text-gray-400,
.text-gray-300,
.text-gray-500 {
    color: var(--amethyst-text-secondary) !important;
}

.text-gray-600,
.text-gray-700 {
    color: var(--amethyst-text) !important;
}

.bg-gray-800 .text-white,
.bg-gray-900 .text-white,
.bg-gray-800 h1,
.bg-gray-900 h1,
.bg-gray-800 h2,
.bg-gray-900 h2 {
    color: var(--amethyst-text) !important;
}

/* ============================================
   STOREFRONT FORM ELEMENTS
   ============================================ */
select,
.product-option-select,
#laufzeit-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: rgba(45, 34, 71, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    border-radius: 0.75rem !important;
    color: white !important;
    padding: 0.75rem 2.5rem 0.75rem 1rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a78bfa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.25em 1.25em !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:focus,
.product-option-select:focus,
#laufzeit-select:focus {
    outline: none !important;
    border-color: var(--amethyst-primary) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4) !important;
}

select:hover,
.product-option-select:hover,
#laufzeit-select:hover {
    border-color: rgba(139, 92, 246, 0.5) !important;
}

select option {
    background-color: #1e1530 !important;
    color: white !important;
    padding: 0.5rem !important;
}

/* Input fields */
input[type="text"].product-option-input,
input[type="number"].product-option-input,
textarea.product-option-input {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: rgba(45, 34, 71, 0.7) !important;
    border: 1px solid rgba(139, 92, 246, 0.25) !important;
    border-radius: 0.75rem !important;
    color: white !important;
}

input[type="text"].product-option-input:focus,
input[type="number"].product-option-input:focus,
textarea.product-option-input:focus {
    outline: none !important;
    border-color: var(--amethyst-primary) !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4) !important;
}

/* Checkbox styling */
input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #2d2247 !important;
    border: 2px solid #4c3a6e !important;
    border-radius: 0.375rem !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    cursor: pointer;
    position: relative;
}

input[type="checkbox"]:checked {
    background-color: var(--amethyst-primary) !important;
    border-color: var(--amethyst-primary) !important;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4) !important;
}

/* Gradient text */
.bg-gradient-to-r {
    color: white !important;
}

.bg-gradient-to-r p,
.bg-gradient-to-r span {
    color: white !important;
}

.bg-gradient-to-r.text-white,
.bg-gradient-to-r .text-white,
.bg-gradient-to-r p,
.bg-gradient-to-r span,
.bg-gradient-to-r div {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   AMETHYST NAV STYLES
   ============================================ */
.amethyst-nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: all 0.3s ease;
}

.amethyst-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #8b5cf6, #a78bfa);
    transition: width 0.3s ease;
}

.amethyst-nav-link:hover::after {
    width: 100%;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--amethyst-bg);
}

::-webkit-scrollbar-thumb {
    background: #4c3a6e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--amethyst-primary);
}

/* ============================================
   CMS BLOCK STYLES
   ============================================ */
:root {
    /* Block: Hero */
    --block-hero-bg: #0f0a1a;
    --block-hero-text: #f0eaf8;

    /* Block: Hero Register */
    --block-hero-register-bg: linear-gradient(135deg, #0f0a1a 0%, #1e1530 50%, #2d1b69 100%);
    --block-hero-register-title-color: #a78bfa;
    --block-hero-register-button-color: #8b5cf6;
    --block-hero-register-form-bg: #1e1530;
    --block-hero-register-badge-color: #a78bfa;

    /* Block: CTA */
    --block-cta-bg: #8b5cf6;
    --block-cta-text: #ffffff;
    --block-cta-button-bg: #ffffff;
    --block-cta-button-text: #8b5cf6;

    /* Block: Domain Search */
    --block-domain-search-bg: linear-gradient(180deg, #0f0a1a 0%, #1a1040 100%);
    --block-domain-search-text: #ffffff;

    /* Block: Contact Form */
    --block-contact-bg: #1a1128;

    /* Block: Feature Boxes */
    --block-feature-box-bg: rgba(30, 21, 48, 0.7);
    --block-feature-box-border: rgba(139, 92, 246, 0.2);
    --block-feature-text: #f0eaf8;

    /* Block: Category Overview */
    --block-category-card-bg: #1e1530;
    --block-category-text: #f0eaf8;

    /* Block: Payment Methods */
    --block-payment-title-color: #a78bfa;
    --block-payment-card-bg: #1e1530;

    /* Block: FAQ */
    --block-faq-bg: #1e1530;
    --block-faq-header-bg: #160f26;
    --block-faq-open-bg: #261c3d;
    --block-faq-open-border: #8b5cf6;

    /* Block: Divider */
    --block-divider-color: #2d2247;
}

/* Block: Hero */
.block-hero {
    background-color: var(--block-hero-bg);
    color: var(--block-hero-text);
}

/* Block: Hero Register */
.block-hero-register {
    background: var(--block-hero-register-bg);
}

.block-hero-register .block-title {
    color: var(--block-hero-register-title-color);
}

.block-hero-register .block-button-primary {
    background: var(--block-hero-register-button-color);
}

.block-hero-register .block-form-bg {
    background: var(--block-hero-register-form-bg);
}

.block-hero-register .block-badge-icon {
    color: var(--block-hero-register-badge-color);
    background: color-mix(in srgb, var(--block-hero-register-badge-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--block-hero-register-badge-color) 25%, transparent);
}

/* Block: CTA */
.block-cta {
    background-color: var(--block-cta-bg);
    color: var(--block-cta-text);
}

.block-cta .block-button {
    background-color: var(--block-cta-button-bg);
    color: var(--block-cta-button-text);
}

/* Block: Domain Search */
.block-domain-search {
    background: var(--block-domain-search-bg);
    color: var(--block-domain-search-text);
}

/* Block: Contact Form */
.block-contact-form {
    background-color: var(--block-contact-bg);
}

/* Block: Feature Boxes */
.block-feature-boxes .block-title {
    color: var(--block-feature-text);
}

.block-feature-boxes .block-subtitle {
    color: var(--block-feature-text);
}

.block-feature-boxes .block-box {
    background: var(--block-feature-box-bg);
    border: 1px solid var(--block-feature-box-border);
}

.block-feature-boxes .block-box-title {
    color: var(--block-feature-text);
}

.block-feature-boxes .block-box-text {
    color: var(--block-feature-text);
}

/* Block: Category Overview */
.block-category-overview .block-title {
    color: var(--block-category-text);
}

.block-category-overview .block-subtitle {
    color: var(--block-category-text);
}

.block-category-overview .block-card {
    background: var(--block-category-card-bg);
}

.block-category-overview .block-card-title {
    color: var(--block-category-text);
}

.block-category-overview .block-card-text {
    color: var(--block-category-text);
    opacity: 0.8;
}

/* Block: Payment Methods */
.block-payment-methods .block-title {
    color: var(--block-payment-title-color);
}

.block-payment-methods .block-card {
    background: var(--block-payment-card-bg);
}

/* Block: FAQ */
.block-faq .faq-item {
    background: var(--block-faq-bg);
}

.block-faq .faq-item button {
    background: var(--block-faq-header-bg);
}

.block-faq .faq-item.faq-open {
    border-color: var(--block-faq-open-border) !important;
    background: var(--block-faq-open-bg) !important;
}

/* Block: Divider */
.block-divider hr {
    background-color: var(--block-divider-color);
}
