/* 
 * BarakahBot Global Styles
 * Theme: Gold / Dark
 */

body {
    background-color: #0b0e11;
    color: #eaecef;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0b0e11;
}

::-webkit-scrollbar-thumb {
    background: #2b3139;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f0b90b;
}

/* Cards */
.card {
    background-color: #1e2329;
    border: 1px solid #2b3139;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    position: relative;
}

/* EMA Cards */
.ema-card {
    background: #161a1e;
    border: 1px solid #2b3139;
    padding: 2px;
    border-radius: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: auto;
}



/* EMA Card Status Colors */
.ema-bull {
    border-color: #0ecb81 !important;
    background-color: rgba(14, 203, 129, 0.1) !important;
}

.ema-bear {
    border-color: #f6465d !important;
    background-color: rgba(246, 70, 93, 0.1) !important;
}

/* Colors & Text Utilities */
.text-bull {
    color: #0ecb81 !important;
}

.text-bear {
    color: #f6465d !important;
}

.text-neutral {
    color: #f0b90b !important;
}

.text-gold {
    color: #f0b90b !important;
}

/* Status Styles */
.status-bull {
    background-color: rgba(14, 203, 129, 0.2);
    color: #0ecb81;
    border: 1px solid #0ecb81;
}

.status-bear {
    background-color: rgba(246, 70, 93, 0.2);
    color: #f6465d;
    border: 1px solid #f6465d;
}

.status-wait {
    background-color: #2b3139;
    color: #848e9c;
    border: 1px solid #474d57;
}

/* Metrics */
.metric-label {
    color: #848e9c;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0px;
}

.metric-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: #eaecef;
    font-family: monospace;
}

/* Inputs */
.bg-dark-input {
    background-color: #2b3139;
    border: 1px solid #474d57;
    color: white;
}

.bg-dark-input:focus {
    outline: none;
    border-color: #f0b90b;
}

/* Badges */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-block;
}

.badge-neutral {
    background-color: rgba(240, 185, 11, 0.2);
    color: #f0b90b;
    border: 1px solid #f0b90b;
}

.badge-bull {
    background-color: rgba(14, 203, 129, 0.2);
    color: #0ecb81;
    border: 1px solid #0ecb81;
}

.badge-bear {
    background-color: rgba(246, 70, 93, 0.2);
    color: #f6465d;
    border: 1px solid #f6465d;
}

/* Theme Buttons */
.btn-gold {
    background-color: #f0b90b;
    /* Yellow-500 equivalent */
    color: #000;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    /* rounded-md */
    transition: background-color 0.2s;
}

.btn-gold:hover {
    background-color: #d9a507;
    /* Yellow-600 */
}

/* Active Tab Highlight for Control Panel */
.tab-active {
    background-color: #ca8a04 !important;
    /* Yellow-600 */
    color: white !important;
}

/* Blinking Animation */
.blinking {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.5;
    }
}

/* Charts */
.chart-sm {
    height: 100px;
    width: 100%;
    flex-grow: 1;
    margin: 10px 0;
}

/* Helper Text */
.helper-text {
    font-size: 0.65rem;
    color: #ffffff;
    font-style: italic;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #2b3139;
    width: 100%;
    line-height: 1.3;
}

/* Favorites */
.fav-item {
    background: #2b3139;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px;
    border: 1px solid #2b3139;
    transition: all 0.2s;
}

.fav-item.active {
    background: #f0b90b;
    color: black;
    font-weight: 800;
    border-color: #f0b90b;
}

.fav-remove {
    color: #666;
    font-size: 10px;
    padding: 2px;
}

.fav-remove:hover {
    color: red;
}

.fav-empty {
    background: transparent;
    border: 1px dashed #474d57;
    color: #474d57;
    cursor: default;
    min-width: 80px;
    justify-content: center;
}

/* Order Book Bars */
.book-container {
    display: flex;
    height: 24px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
    font-weight: bold;
    font-size: 0.75rem;
    line-height: 24px;
}

.book-long {
    background-color: #0ecb81;
    text-align: left;
    padding-left: 8px;
    color: #000;
    width: 50%;
    transition: width 0.5s;
}

.book-short {
    background-color: #f6465d;
    text-align: right;
    padding-right: 8px;
    color: #fff;
    width: 50%;
    transition: width 0.5s;
}

/* Danger Buttons */
.btn-danger {
    background-color: #ff0000;
    color: rgb(0, 0, 0);
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* --- Mobile Responsiveness Utilities --- */

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    margin-bottom: 1rem;
    border: 1px solid #2b3139;
    border-radius: 8px;
}

/* Ensure tables inside the wrapper behave well */
.table-responsive table {
    min-width: 600px;
    /* Force minimum width to trigger scroll on small screens */
    width: 100%;
}

/* Mobile-friendly Button Group */
.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .btn-group-responsive {
        justify-content: flex-start;
    }
}

/* Mobile-friendly Header Stack */
.header-responsive {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .header-responsive {
        flex-direction: row;
        justify-content: space-between;
    }
}