/* ==========================================================================
   PocketCalcs Moon/Night Theme

   Dark blue night theme for the Moon Phase Calculator.
   ========================================================================== */

:root {
    /* Primary brand colors - Deep Blue */
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-rgb: 59, 130, 246;

    /* Accent - Moonlight */
    --color-accent: #e0e7ff;
    --color-accent-light: #c7d2fe;

    /* Header - Dark Night Sky */
    --color-header-bg: linear-gradient(to right, #0f172a, #1e1b4b);
    --color-header-text: #ffffff;
    --color-header-hover: #a5b4fc;
    --color-beta-badge-bg: linear-gradient(45deg, #3b82f6, #6366f1);

    /* Body - Deep Night */
    --color-bg-body: #0f172a;
    --color-bg-card: rgba(30, 41, 59, 0.9);

    /* Text - Light for dark background */
    --color-text-primary: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-text-muted: #a5b4fc;

    /* Form elements */
    --color-border: rgba(255, 255, 255, 0.15);
    --color-input-bg: rgba(15, 23, 42, 0.8);

    /* Results - Transparent dark */
    --color-results-from: transparent;
    --color-results-to: transparent;
    --color-results-border: rgba(255, 255, 255, 0.1);
    --color-results-text: #a5b4fc;

    /* FAQ - Dark with glass effect */
    --color-faq-from: rgba(15, 23, 42, 0.6);
    --color-faq-to: rgba(15, 23, 42, 0.6);
    --color-faq-border: rgba(255, 255, 255, 0.1);
    --color-faq-heading: #a5b4fc;
}

/* ==========================================================================
   Night Theme Overrides
   ========================================================================== */

/* Night sky background with subtle stars effect */
body {
    background-color: #0f172a;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
}

/* Header with border */
.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Logo with moonlight gradient */
.logo-text {
    background: linear-gradient(to right, #a5b4fc, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Moon theme logo - use default logo with white filter */
.logo-icon {
    filter: brightness(0) invert(1);
}

/* Beta badge with gradient */
.beta-badge {
    background: linear-gradient(45deg, #3b82f6, #6366f1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Calculator wrapper with glass effect */
.calculator-wrapper {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* H1 with night gradient */
h1 {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Form inputs with dark background */
.form-input,
.input-control {
    background-color: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
}

.form-input::placeholder,
.input-control::placeholder {
    color: #64748b;
}

.form-input:hover,
.input-control:hover,
.form-input:focus,
.input-control:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.2);
    background-color: rgba(15, 23, 42, 0.9);
}

/* Date input styling for dark theme */
input[type="date"].form-input {
    color-scheme: dark;
}

/* Buttons with gradient */
.calculate-button {
    background: linear-gradient(45deg, #1e3a8a, #3b82f6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.calculate-button:hover {
    background: linear-gradient(45deg, #1e40af, #2563eb);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.reset-button {
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.reset-button:hover {
    background: rgba(148, 163, 184, 0.2);
}

/* Results section */
.results {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    background: transparent;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.results-title {
    color: #a5b4fc;
    text-align: center;
    border-bottom: none;
}

/* FAQ Section with glass effect */
.faq-section {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 32px;
}

.faq-section h2 {
    background: linear-gradient(to right, #a5b4fc, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
}

.faq-question {
    padding: 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #a5b4fc;
    background: rgba(15, 23, 42, 0.6);
    transition: all 0.2s;
}

.faq-question:hover {
    background: rgba(30, 41, 59, 0.8);
}

.faq-question::after {
    border-color: #a5b4fc;
}

.faq-answer {
    padding: 1rem;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Error states for dark theme */
.error-message {
    color: #fca5a5 !important;
    background: rgba(220, 38, 38, 0.1) !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Share button styling for dark theme */
.share-trigger-btn {
    background: rgba(148, 163, 184, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-trigger-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: #a5b4fc;
    color: #a5b4fc;
}

/* Share modal dark theme */
.share-modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-header h3 {
    color: #e2e8f0;
}

.share-modal-close {
    color: #94a3b8;
}

.share-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.share-btn {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.share-btn:hover {
    background: rgba(30, 41, 59, 0.8);
}

.share-divider {
    background: rgba(255, 255, 255, 0.1);
}
