/* ==========================================================================
   BISMILLAHCSS: BASE UI COMPONENTS
   "Universal core building blocks."
   ========================================================================== */

/* --- Accordion --- */
.b-accordion {
    border-bottom: 1px solid var(--bismillah-ultra-border);
}

.b-accordion-trigger {
    width: 100%;
    padding: 16px;
    text-align: left;
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.b-accordion-content {
    padding: 0 16px 16px;
    display: none;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Alert --- */
.b-alert {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--bismillah-ultra-border);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    gap: 12px;
    align-items: center;
}

.b-alert-title {
    font-weight: 700;
    margin-bottom: 4px;
}

/* --- Avatar --- */
.b-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bismillah-ultra-surface);
    border: 2px solid var(--bismillah-ultra-primary);
}

.b-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Badge --- */
.b-badge {
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bismillah-ultra-primary);
    color: #000;
}

/* --- Breadcrumb --- */
.b-breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.b-breadcrumb-sep {
    opacity: 0.3;
}

/* --- Button --- */
.b-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.b-btn-primary {
    background: var(--bismillah-ultra-primary);
    color: #000;
}

.b-btn-outline {
    border-color: var(--bismillah-ultra-primary);
    color: var(--bismillah-ultra-primary);
    background: transparent;
}

/* --- Card --- */
.b-card {
    background: var(--bismillah-ultra-surface);
    border: 1px solid var(--bismillah-ultra-border);
    border-radius: 16px;
    padding: 24px;
}

.b-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

/* --- Checkbox --- */
.b-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--bismillah-ultra-border);
    background: transparent;
    appearance: none;
    cursor: pointer;
    position: relative;
}

.b-checkbox:checked {
    background: var(--bismillah-ultra-primary);
    border-color: var(--bismillah-ultra-primary);
}

/* --- Input --- */
.b-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--bismillah-ultra-border);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    transition: border-color 0.2s;
}

.b-input:focus {
    border-color: var(--bismillah-ultra-primary);
    outline: none;
}

/* --- Skeleton --- */
.b-skeleton {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.b-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: b-shimmer 1.5s infinite;
}

@keyframes b-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* --- Table --- */
.b-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: var(--bismillah-ultra-surface);
    border-radius: 12px;
    overflow: hidden;
}

.b-table th {
    padding: 12px 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--bismillah-ultra-border);
}

.b-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bismillah-ultra-border);
}

.b-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Tabs --- */
.b-tabs {
    display: flex;
    flex-direction: column;
}

.b-tabs-list {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.b-tabs-trigger {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    border: none;
    background: none;
}

.b-tabs-trigger.active {
    background: var(--bismillah-ultra-primary);
    color: #000;
}

/* --- Switch --- */
.b-switch {
    width: 44px;
    height: 24px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--bismillah-ultra-border);
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.b-switch::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.b-switch:checked {
    background: var(--bismillah-ultra-primary);
}

.b-switch:checked::after {
    transform: translateX(20px);
}

/* --- Tooltip --- */
.b-tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.b-tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #fff;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    white-space: nowrap;
}

.b-tooltip:hover .b-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* --- Terminal (V3 Modern) --- */
.f-terminal {
    background: #0d0d11;
    border-radius: 12px;
    border: 1px solid var(--bismillah-ultra-border);
    font-family: 'Fira Code', monospace;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.f-terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--bismillah-ultra-border);
}

.f-terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.6;
}

.f-dot-1 {
    background: #ff5f56;
}

.f-dot-2 {
    background: #ffbd2e;
}

.f-dot-3 {
    background: #27c93f;
}

.f-terminal-content {
    padding: 20px;
    color: #00f2ff;
    font-size: 0.85rem;
}

/* --- ASCII Art Container --- */
.f-ascii-art {
    font-family: monospace;
    white-space: pre;
    color: var(--bismillah-ultra-primary);
    line-height: 1;
    font-size: 8px;
    opacity: 0.8;
}

/* --- Tooltip Card --- */
.f-tooltip-card {
    position: relative;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--bismillah-ultra-border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.f-tooltip-card:hover {
    border-color: var(--bismillah-ultra-primary);
    background: rgba(0, 242, 255, 0.03);
    transform: scale(1.02);
}

/* --- Typography --- */
.b-h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -2px;
}

.b-h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.b-h3 {
    font-size: 1.75rem;
    font-weight: 700;
}

.b-p {
    font-size: 1.125rem;
    opacity: 0.7;
    font-weight: 400;
}

/* --- Progress --- */
.b-progress {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.b-progress-bar {
    height: 100%;
    background: var(--bismillah-ultra-primary);
    transition: width 0.3s;
}