/* Scoped styles for Days Calculator App */

:root {
    --days-bg: rgba(23, 23, 23, 0.7);
    --days-primary: #f59e0b;
    /* Amber-500 */
    --days-primary-hover: #d97706;
    /* Amber-600 */
    --days-border: rgba(255, 255, 255, 0.1);
}

.app-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.main-card {
    background: var(--days-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--days-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    min-height: 600px;
    margin-top: 2rem;
}

/* Common Section Styles */
.io-section {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Left Section */
.io-section:first-child {
    border-right: 1px solid var(--days-border);
}

.output-section {
    background: rgba(0, 0, 0, 0.2);
}

.brand {
    margin-bottom: 2rem;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #fcd34d, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.brand p {
    color: #94a3b8;
    font-size: 1rem;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mode-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--days-border);
    background: transparent;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.mode-tab.active {
    background: linear-gradient(135deg, var(--days-primary), var(--days-primary-hover));
    color: white;
    border-color: transparent;
}

.mode-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    transform: none;
    filter: none;
}

/* Mode Content */
.mode-content {
    display: none;
}

.mode-content.active {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

input[type="date"],
input[type="number"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--days-border);
    padding: 1rem;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

input[type="date"]:focus,
input[type="number"]:focus {
    border-color: var(--days-primary);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Direction Toggle */
.direction-toggle {
    display: flex;
    border: 1px solid var(--days-border);
    border-radius: 12px;
    overflow: hidden;
}

.dir-btn {
    flex: 1;
    padding: 1rem 1.2rem;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.dir-btn.active {
    background: var(--days-primary);
    color: white;
}

.dir-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    filter: none;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

button {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

#calculate-btn {
    background: linear-gradient(135deg, var(--days-primary), var(--days-primary-hover));
    color: white;
}

button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Results */
.results-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.placeholder-text {
    color: #64748b;
    font-size: 1rem;
    text-align: center;
    margin-top: 4rem;
}

.result-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--days-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}

.primary-result {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    border-color: rgba(245, 158, 11, 0.3);
    padding: 1.5rem;
}

.result-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.result-value {
    color: #f8fafc;
    font-size: 1.2rem;
    font-weight: 600;
}

.result-note {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.big-num {
    font-size: 2.5rem;
    color: var(--days-primary);
    font-weight: 700;
}

.big-unit {
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 400;
}

.small-text {
    font-size: 0.95rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-card {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .io-section:first-child {
        border-right: none;
        border-bottom: 1px solid var(--days-border);
    }

    .output-section {
        min-height: 400px;
    }

    .brand h1 {
        font-size: 1.8rem;
    }

    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .big-num {
        font-size: 1.8rem;
    }
}
