/* ===================================================
   BD Number Lookup - ফাস্ট লোডিং অপ্টিমাইজড CSS
   =================================================== */

/* ===== CSS কাস্টম প্রোপার্টি (Variables) ===== */
:root {
    --bdnl-primary: #0f4c75;
    --bdnl-primary-dark: #1b262c;
    --bdnl-accent: #bbe1fa;
    --bdnl-success: #10b981;
    --bdnl-error: #ef4444;
    --bdnl-text: #1e293b;
    --bdnl-text-light: #64748b;
    --bdnl-text-muted: #94a3b8;
    --bdnl-bg: #ffffff;
    --bdnl-bg-alt: #f8fafc;
    --bdnl-border: #e2e8f0;
    --bdnl-radius: 14px;
    --bdnl-radius-sm: 10px;
    --bdnl-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --bdnl-transition: 0.25s ease;
}

/* ===== কন্টেইনার ===== */
.bdnl-wrapper {
    max-width: 620px;
    margin: 30px auto;
    padding: 0 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.bdnl-wrapper *,
.bdnl-wrapper *::before,
.bdnl-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== হেডার ===== */
.bdnl-header {
    background: linear-gradient(135deg, var(--bdnl-primary) 0%, var(--bdnl-primary-dark) 100%);
    border-radius: var(--bdnl-radius) var(--bdnl-radius) 0 0;
    padding: 32px 24px 26px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.bdnl-header::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.bdnl-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bdnl-header-icon svg {
    fill: var(--bdnl-accent);
}

.bdnl-title {
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 4px;
    position: relative;
}

.bdnl-subtitle {
    color: var(--bdnl-accent);
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
    position: relative;
}

/* ===== লাইট থিম ===== */
.bdnl-theme-light .bdnl-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 2px solid #bae6fd;
}

.bdnl-theme-light .bdnl-header-icon {
    background: rgba(15, 76, 117, 0.1);
    border-color: rgba(15, 76, 117, 0.15);
}

.bdnl-theme-light .bdnl-header-icon svg {
    fill: var(--bdnl-primary);
}

.bdnl-theme-light .bdnl-title {
    color: var(--bdnl-primary-dark);
}

.bdnl-theme-light .bdnl-subtitle {
    color: var(--bdnl-text-light);
}

/* ===== বডি ===== */
.bdnl-body {
    background: var(--bdnl-bg);
    border: 1px solid var(--bdnl-border);
    border-top: none;
    border-radius: 0 0 var(--bdnl-radius) var(--bdnl-radius);
    padding: 24px;
    box-shadow: var(--bdnl-shadow);
}

/* ===== ফর্ম ===== */
.bdnl-form {
    display: flex;
    gap: 8px;
}

.bdnl-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.bdnl-input-icon {
    position: absolute;
    left: 14px;
    fill: var(--bdnl-text-muted);
    pointer-events: none;
    transition: fill var(--bdnl-transition);
    flex-shrink: 0;
}

.bdnl-input {
    width: 100%;
    padding: 12px 36px 12px 42px;
    border: 2px solid var(--bdnl-border);
    border-radius: var(--bdnl-radius-sm);
    font-size: 16px;
    font-weight: 500;
    color: var(--bdnl-text);
    background: var(--bdnl-bg-alt);
    transition: border-color var(--bdnl-transition), box-shadow var(--bdnl-transition), background var(--bdnl-transition);
    outline: none;
    letter-spacing: 0.8px;
    -webkit-appearance: none;
    appearance: none;
}

.bdnl-input:focus {
    border-color: var(--bdnl-primary);
    background: var(--bdnl-bg);
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.1);
}

.bdnl-input:focus ~ .bdnl-input-icon {
    fill: var(--bdnl-primary);
}

.bdnl-input::placeholder {
    color: var(--bdnl-text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

/* ক্লিয়ার বাটন */
.bdnl-clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--bdnl-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    line-height: 1;
    transition: color var(--bdnl-transition), background var(--bdnl-transition);
}

.bdnl-clear-btn:hover {
    color: var(--bdnl-error);
    background: rgba(239, 68, 68, 0.08);
}

/* সার্চ বাটন */
.bdnl-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--bdnl-primary), var(--bdnl-primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--bdnl-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--bdnl-transition), box-shadow var(--bdnl-transition), opacity var(--bdnl-transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bdnl-btn svg {
    fill: currentColor;
}

.bdnl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15, 76, 117, 0.3);
}

.bdnl-btn:active {
    transform: translateY(0);
}

.bdnl-btn:disabled {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

/* ===== অপারেটর ব্যাজ ===== */
.bdnl-operator-badge {
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bdnl-bg-alt);
    border: 1px solid var(--bdnl-border);
    color: var(--bdnl-text-light);
}

/* ===== এরর এলার্ট ===== */
.bdnl-alert {
    border-radius: var(--bdnl-radius-sm);
    padding: 11px 14px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: bdnl-fadeIn 0.25s ease;
}

.bdnl-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.bdnl-alert-error svg {
    fill: #dc2626;
    flex-shrink: 0;
}

/* ===== স্কেলেটন লোডিং (CSS only - কোনো JS অ্যানিমেশন নেই) ===== */
.bdnl-skeleton {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--bdnl-border);
    border-radius: var(--bdnl-radius-sm);
    animation: bdnl-fadeIn 0.2s ease;
}

.bdnl-skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bdnl-border);
}

.bdnl-sk-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bdnl-shimmer 1.5s infinite linear;
    flex-shrink: 0;
}

.bdnl-sk-lines {
    flex: 1;
}

.bdnl-sk-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bdnl-shimmer 1.5s infinite linear;
    margin-bottom: 8px;
}

.bdnl-sk-line:last-child {
    margin-bottom: 0;
}

.bdnl-sk-w60 { width: 60%; }
.bdnl-sk-w40 { width: 40%; }
.bdnl-sk-w80 { width: 80%; }

.bdnl-sk-row {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bdnl-shimmer 1.5s infinite linear;
    margin-bottom: 8px;
}

.bdnl-sk-row:last-child {
    margin-bottom: 0;
}

@keyframes bdnl-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== রেজাল্ট কার্ড ===== */
.bdnl-result {
    margin-top: 20px;
    border: 1px solid var(--bdnl-border);
    border-radius: var(--bdnl-radius-sm);
    overflow: hidden;
    animation: bdnl-slideUp 0.35s ease;
}

.bdnl-result-head {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #a7f3d0;
}

.bdnl-result-avatar {
    width: 38px;
    height: 38px;
    background: var(--bdnl-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bdnl-result-avatar svg {
    fill: #fff;
}

.bdnl-result-name {
    font-size: 16px;
    font-weight: 700;
    color: #065f46;
    margin: 0;
}

.bdnl-result-sub {
    font-size: 11px;
    color: #047857;
    margin: 2px 0 0;
}

/* ===== রেজাল্ট রো ===== */
.bdnl-result-body {
    padding: 0;
}

.bdnl-row {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    transition: background var(--bdnl-transition);
    gap: 12px;
}

.bdnl-row:last-child {
    border-bottom: none;
}

.bdnl-row:hover {
    background: var(--bdnl-bg-alt);
}

.bdnl-row-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bdnl-row-icon svg {
    width: 16px;
    height: 16px;
}

.bdnl-row-info {
    min-width: 0;
    flex: 1;
}

.bdnl-row-label {
    font-size: 11px;
    color: var(--bdnl-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.bdnl-row-value {
    font-size: 14px;
    color: var(--bdnl-text);
    font-weight: 600;
    margin: 1px 0 0;
    word-break: break-word;
}

/* আইকন কালার */
.bdnl-ic-blue { background: #eff6ff; }
.bdnl-ic-blue svg { fill: #3b82f6; }

.bdnl-ic-green { background: #ecfdf5; }
.bdnl-ic-green svg { fill: #10b981; }

.bdnl-ic-purple { background: #f5f3ff; }
.bdnl-ic-purple svg { fill: #8b5cf6; }

.bdnl-ic-orange { background: #fff7ed; }
.bdnl-ic-orange svg { fill: #f97316; }

.bdnl-ic-pink { background: #fdf2f8; }
.bdnl-ic-pink svg { fill: #ec4899; }

.bdnl-ic-teal { background: #f0fdfa; }
.bdnl-ic-teal svg { fill: #14b8a6; }

.bdnl-ic-red { background: #fef2f2; }
.bdnl-ic-red svg { fill: #ef4444; }

.bdnl-ic-indigo { background: #eef2ff; }
.bdnl-ic-indigo svg { fill: #6366f1; }

.bdnl-ic-amber { background: #fffbeb; }
.bdnl-ic-amber svg { fill: #f59e0b; }

/* ===== কপি বাটন ===== */
.bdnl-copy-btn {
    background: none;
    border: 1px solid var(--bdnl-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    color: var(--bdnl-text-muted);
    cursor: pointer;
    transition: all var(--bdnl-transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.bdnl-copy-btn:hover {
    border-color: var(--bdnl-primary);
    color: var(--bdnl-primary);
    background: rgba(15, 76, 117, 0.04);
}

.bdnl-copy-btn.bdnl-copied {
    border-color: var(--bdnl-success);
    color: var(--bdnl-success);
}

/* ===== ফুটার ===== */
.bdnl-footer {
    text-align: center;
    margin-top: 16px;
    color: var(--bdnl-text-muted);
    font-size: 11px;
}

/* ===== অ্যানিমেশন ===== */
@keyframes bdnl-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bdnl-slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== রেসপনসিভ ===== */
@media (max-width: 480px) {
    .bdnl-form {
        flex-direction: column;
    }

    .bdnl-btn {
        justify-content: center;
        padding: 13px;
    }

    .bdnl-header {
        padding: 26px 18px 22px;
    }

    .bdnl-title {
        font-size: 18px;
    }

    .bdnl-body {
        padding: 18px;
    }

    .bdnl-row {
        padding: 10px 14px;
    }
}

/* ===== প্রিন্ট ===== */
@media print {
    .bdnl-form,
    .bdnl-footer,
    .bdnl-copy-btn {
        display: none !important;
    }

    .bdnl-wrapper {
        box-shadow: none;
    }
}