/* Epoch Converter Styles */

/* Mode Selector - 4 columns */
.mode-selector-4col {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* Mode Selector Base */
.mode-selector-modern {
    display: grid;
    gap: 12px;
}

.mode-option {
    position: relative;
}

.mode-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin: 0;
    height: 100%;
}

.mode-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mode-icon .fsvg {
    width: 22px;
    height: 22px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.mode-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.mode-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

/* Hover State */
.mode-label:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.mode-label:hover .mode-icon {
    background: #e8edf3;
}

.mode-label:hover .mode-icon .fsvg {
    opacity: 0.8;
}

/* Checked State */
.mode-input:checked + .mode-label {
    border-color: #052c65;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(5, 44, 101, 0.1), inset 0 0 0 1px rgba(5, 44, 101, 0.1);
    transform: translateY(0);
}

.mode-input:checked + .mode-label .mode-icon {
    background: #052c65;
}

.mode-input:checked + .mode-label .mode-icon .fsvg {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.mode-input:checked + .mode-label .mode-title {
    color: #052c65;
}

.mode-input:checked + .mode-label .mode-desc {
    color: #475569;
}

/* Quick Reference */
.quick-ref-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
    user-select: none;
}

.quick-ref-icon {
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.quick-ref-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bs-border-color);
}

.quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
}

.quick-ref-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bs-secondary-bg);
    border-radius: 6px;
    font-size: 13px;
}

.qr-label {
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.qr-value {
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    font-family: 'Courier New', monospace;
}

/* Results Display */
.epoch-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    padding: 12px;
    background: var(--bs-secondary-bg);
    border-left: 3px solid #052c65;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.result-item:hover {
    background: var(--bs-tertiary-bg);
    transform: translateX(2px);
}

.result-item-highlight {
    padding: 12px;
    background: linear-gradient(135deg, rgba(5, 44, 101, 0.08), rgba(5, 44, 101, 0.04));
    border-left: 3px solid #052c65;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-item-batch {
    padding: 10px;
    background: var(--bs-secondary-bg);
    border-left: 3px solid #6c757d;
    border-radius: 4px;
    font-size: 13px;
}

.result-item-error {
    padding: 12px;
    background: rgba(220, 53, 69, 0.05);
    border-left: 3px solid #dc3545;
    border-radius: 4px;
}

.result-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-secondary-color);
    margin-bottom: 6px;
}

.result-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.result-value code {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    background: none;
    padding: 0;
    word-break: break-all;
    flex: 1;
}

.copy-btn {
    flex-shrink: 0;
    padding: 4px 8px;
    min-width: auto;
}

.copy-btn .fsvg {
    opacity: 0.7;
    transition: all 0.2s ease;
    filter: none;
}

.copy-btn:hover .fsvg {
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

/* Dark mode for copy buttons */
[data-bs-theme="dark"] .copy-btn .fsvg {
    opacity: 0.6;
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .copy-btn:hover .fsvg {
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

/* Monospace font for batch input */
.font-mono {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
}

/* Format hint */
#formatHint {
    font-size: 12px;
    font-weight: 500;
}

/* Now button styles */
.btn-outline-success.btn-sm {
    font-size: 12px;
    padding: 4px 8px;
    border-width: 1px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-outline-success.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-outline-success.btn-sm .fsvg {
    opacity: 0.8;
    transition: all 0.2s ease;
    filter: none;
}

.btn-outline-success.btn-sm:hover .fsvg {
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

/* Dark mode for now buttons */
[data-bs-theme="dark"] .btn-outline-success.btn-sm {
    border-color: #198754;
    color: #75b798;
}

[data-bs-theme="dark"] .btn-outline-success.btn-sm:hover {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-success.btn-sm .fsvg {
    opacity: 0.6;
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] .btn-outline-success.btn-sm:hover .fsvg {
    opacity: 1;
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

/* Mobile */
@media (max-width: 768px) {
    .mode-selector-4col {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }

    .mode-label {
        padding: 12px;
        gap: 10px;
    }

    .mode-icon {
        width: 40px;
        height: 40px;
    }

    .mode-icon .fsvg {
        width: 20px;
        height: 20px;
    }

    .mode-title {
        font-size: 14px;
    }

    .quick-ref-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-btn {
        align-self: flex-end;
    }
}

/* Dark Mode */
[data-bs-theme="dark"] .mode-label {
    background: #1a1d23;
    border-color: #343a40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-icon {
    background: #2d3239;
}

[data-bs-theme="dark"] .mode-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] .mode-desc {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mode-label:hover {
    border-color: #495057;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .mode-label:hover .mode-icon {
    background: #3a3f47;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label {
    border-color: #6ea8fe;
    background: #212529;
    box-shadow: 0 2px 8px rgba(110, 168, 254, 0.2), inset 0 0 0 1px rgba(110, 168, 254, 0.2);
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-icon {
    background: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-title {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .mode-input:checked + .mode-label .mode-desc {
    color: #9ca3af;
}

[data-bs-theme="dark"] .result-item {
    background: rgba(255,255,255,0.05);
    border-left-color: #4a7bc8;
}

[data-bs-theme="dark"] .result-item-highlight {
    background: linear-gradient(135deg, rgba(110, 168, 254, 0.15), rgba(110, 168, 254, 0.05));
    border-left-color: #6ea8fe;
}

[data-bs-theme="dark"] .result-item-error {
    background: rgba(220, 53, 69, 0.1);
}

[data-bs-theme="dark"] .quick-ref-item {
    background: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .font-mono {
    background: rgba(255,255,255,0.05);
    color: #e9ecef;
}
