/* Custom dark theme overrides for Budget App */

:root {
    --bs-body-bg: #0d1117;
    --bs-body-color: #c9d1d9;
    --card-bg: #161b22;
    --border-color: #30363d;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* Card styling */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Form controls - larger tap targets */
.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

/* Menu tiles - mobile-first design */
.menu-tile {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid var(--border-color);
    min-height: 160px;
}

.menu-tile:hover,
.menu-tile:focus {
    transform: translateY(-4px);
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    outline: none;
}

.menu-tile:active {
    transform: translateY(-2px);
}

.menu-tile .card-body {
    padding: 1.5rem;
}

/* Menu grid spacing */
.menu-grid {
    margin-bottom: 2rem;
}

/* Navbar styling */
.navbar {
    border-bottom: 1px solid var(--border-color);
}

/* Button enhancements */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    min-height: 50px;
}

.btn-primary {
    background-color: #238636;
    border-color: #238636;
}

.btn-primary:hover {
    background-color: #2ea043;
    border-color: #2ea043;
}

.btn-primary:active,
.btn-primary:focus {
    background-color: #1f7a2f;
    border-color: #1f7a2f;
}

/* Alert styling */
.alert-danger {
    background-color: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.4);
    color: #f85149;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .menu-tile {
        min-height: 140px;
    }
    
    .menu-tile .card-body {
        padding: 1rem;
    }
    
    .menu-tile svg {
        width: 40px !important;
        height: 40px !important;
    }
    
    .menu-tile h5 {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .menu-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }
    
    .menu-grid > div {
        width: 100%;
    }
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Accessibility improvements */
.menu-tile:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* SMS Card styling */
.sms-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.sms-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.sms-card:active {
    transform: translateY(0);
}

.sms-body {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    margin-bottom: 0;
}

.sms-preview {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

/* Badge styling */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

/* Modal improvements for mobile */
.modal-fullscreen .modal-body {
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

/* Radio button groups for better mobile UX */
.btn-group {
    display: flex;
}

.btn-group .btn {
    flex: 1;
}

/* Form label improvements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Large tap targets for form inputs */
.form-control, .btn {
    min-height: 48px;
}

.form-control-lg {
    min-height: 56px;
    font-size: 1.25rem;
}

/* Transaction Card styling */
.transaction-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.transaction-card:hover {
    border-left-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    transform: translateX(4px);
}

.transaction-card:active {
    transform: translateX(2px);
}

/* Toastr customization for dark theme */
#toast-container > div {
    opacity: 0.95;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast-success {
    background-color: #238636 !important;
}

.toast-error {
    background-color: #da3633 !important;
}

.toast-info {
    background-color: #1f6feb !important;
}

.toast-warning {
    background-color: #bf8700 !important;
}

/* Match Status Indicator */
#matchStatusIndicator {
    border-left-width: 4px;
    border-left-style: solid;
}

#matchStatusIndicator.alert-success {
    border-left-color: #238636;
    background-color: rgba(35, 134, 54, 0.1);
}

#matchStatusIndicator.alert-warning {
    border-left-color: #bf8700;
    background-color: rgba(191, 135, 0, 0.1);
}

#matchStatusIndicator.alert-info {
    border-left-color: #1f6feb;
    background-color: rgba(31, 111, 235, 0.1);
}
