/* ============================================================
   Additive styles for new features (original style.css untouched)
   - Popup notifications (notify.js)
   - Domain value widget
   - Embed code designer
   - Payment method selector
   - Views / share buttons
   ============================================================ */

/* ---------- Popup Notifications ---------- */
#aiw-notify-container {
    position: fixed; top: 20px; right: 20px; z-index: 99999;
    display: flex; flex-direction: column; gap: 12px; max-width: 380px; width: calc(100% - 40px);
}
.aiw-toast {
    display: flex; align-items: flex-start; gap: 12px; position: relative; overflow: hidden;
    background: #ffffff; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.25);
    opacity: 0; transform: translateX(120%); transition: all 0.35s cubic-bezier(.21,1.02,.73,1);
    border-left: 5px solid #38bdf8;
}
.aiw-toast.aiw-show { opacity: 1; transform: translateX(0); }
.aiw-toast.aiw-hide { opacity: 0; transform: translateX(120%); }
.aiw-toast-icon { font-size: 1.5rem; line-height: 1; margin-top: 2px; }
.aiw-toast-success { border-left-color: #22c55e; } .aiw-toast-success .aiw-toast-icon { color: #22c55e; }
.aiw-toast-error   { border-left-color: #ef4444; } .aiw-toast-error .aiw-toast-icon { color: #ef4444; }
.aiw-toast-warning { border-left-color: #f59e0b; } .aiw-toast-warning .aiw-toast-icon { color: #f59e0b; }
.aiw-toast-info    { border-left-color: #38bdf8; } .aiw-toast-info .aiw-toast-icon { color: #38bdf8; }
.aiw-toast-title { font-weight: 700; color: #1e293b; font-size: 0.95rem; }
.aiw-toast-msg { color: #475569; font-size: 0.88rem; line-height: 1.45; word-break: break-word; }
.aiw-toast-close {
    background: none; border: none; color: #94a3b8; font-size: 1.2rem; cursor: pointer;
    padding: 0 2px; line-height: 1; margin-left: auto;
}
.aiw-toast-bar {
    position: absolute; bottom: 0; left: 0; height: 3px; width: 100%;
    background: currentColor; opacity: 0.25; animation: aiwBar 4.5s linear forwards;
}
@keyframes aiwBar { from { width: 100%; } to { width: 0; } }

/* ---------- Confirm Dialog ---------- */
.aiw-confirm-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.6); z-index: 99998;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; transition: opacity 0.25s ease; backdrop-filter: blur(2px);
}
.aiw-confirm-overlay.aiw-show { opacity: 1; }
.aiw-confirm-box {
    background: #fff; border-radius: 16px; padding: 30px; max-width: 400px; width: 100%;
    text-align: center; transform: scale(0.9); transition: transform 0.25s ease;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
}
.aiw-confirm-overlay.aiw-show .aiw-confirm-box { transform: scale(1); }
.aiw-confirm-icon {
    width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 18px;
    background: #e0f2fe; color: #0ea5e9; display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
}
.aiw-confirm-icon.aiw-danger { background: #fee2e2; color: #ef4444; }
.aiw-confirm-box h3 { color: #1e293b; margin-bottom: 8px; font-size: 1.25rem; }
.aiw-confirm-msg { color: #64748b; font-size: 0.95rem; margin-bottom: 22px; }
.aiw-confirm-actions { display: flex; gap: 10px; justify-content: center; }
.aiw-confirm-actions button {
    padding: 11px 22px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.95rem; border: none;
}
.aiw-btn-cancel { background: #f1f5f9; color: #475569; }
.aiw-btn-cancel:hover { background: #e2e8f0; }
.aiw-btn-yes { background: #2563eb; color: #fff; }
.aiw-btn-yes:hover { background: #1d4ed8; }
.aiw-btn-yes.aiw-danger { background: #ef4444; }
.aiw-btn-yes.aiw-danger:hover { background: #dc2626; }

/* ---------- Domain Value Widget (light theme - Point 4) ---------- */
.value-widget {
    background: linear-gradient(135deg, #ffffff 0%, #eef7fd 100%);
    border: 1px solid #d6ebf9;
    border-radius: 12px; padding: 22px; color: #333a40; position: relative; overflow: hidden;
}
.value-widget::before {
    content: ''; position: absolute; top: -60px; right: -60px; width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(11,145,226,0.14), transparent 70%); border-radius: 50%;
}
.value-widget .vw-label { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; color: #0B91E2; font-weight: 700; }
.value-widget .vw-amount { font-size: 2.3rem; font-weight: 800; color: #16a34a; margin: 5px 0; }
.value-widget .vw-range { display: flex; justify-content: space-between; font-size: 0.8rem; color: #64748b; margin-top: 4px; }
.value-widget .vw-meter { height: 8px; background: #dbeafe; border-radius: 10px; overflow: hidden; margin-top: 8px; }
.value-widget .vw-meter-fill {
    height: 100%; width: 0; border-radius: 10px;
    background: linear-gradient(90deg, #0B91E2, #22c55e); transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.value-widget .vw-factors { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.value-widget .vw-chip {
    background: #ffffff; border: 1px solid #dbeafe;
    border-radius: 20px; padding: 4px 11px; font-size: 0.72rem; color: #475569;
}
.value-widget .vw-chip i { color: #0B91E2; margin-right: 4px; }
.value-widget .vw-live {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: #15803d;
    background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.3);
    padding: 3px 10px; border-radius: 20px; margin-top: 12px;
}
.value-widget .vw-live .dot {
    width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: vwPulse 1.5s infinite;
}
@keyframes vwPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Embed Designer ---------- */
.embed-designer .ed-row { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.embed-designer .ed-field { flex: 1; min-width: 110px; }
.embed-designer .ed-field label { font-size: 0.75rem; font-weight: 600; color: #64748b; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.embed-designer input[type="color"] {
    width: 100%; height: 40px; padding: 3px; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; margin-bottom: 0; background: #fff;
}
.embed-designer .ed-sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.embed-designer .ed-size-btn {
    flex: 1; min-width: 60px; padding: 8px 5px; border: 2px solid #e2e8f0; background: #fff; border-radius: 8px;
    cursor: pointer; font-size: 0.75rem; font-weight: 600; color: #64748b; text-align: center; transition: all 0.2s;
}
.embed-designer .ed-size-btn.active { border-color: #38bdf8; color: #0284c7; background: #f0f9ff; }
.embed-designer .ed-preview {
    background: repeating-conic-gradient(#f8fafc 0% 25%, #f1f5f9 0% 50%) 50% / 24px 24px;
    border: 1px dashed #cbd5e1; border-radius: 10px; padding: 20px; margin-bottom: 12px;
    display: flex; justify-content: center; overflow: auto;
}
.embed-designer textarea.ed-code {
    width: 100%; height: 110px; font-size: 0.72rem; font-family: monospace;
    background: #0f172a; color: #7dd3fc; border: none; padding: 12px; border-radius: 8px; margin-bottom: 10px;
}

/* ---------- Payment Method Selector ---------- */
.pm-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.pm-option {
    display: flex; align-items: center; gap: 12px; border: 2px solid #e2e8f0; border-radius: 10px;
    padding: 12px 15px; cursor: pointer; transition: all 0.2s; background: #fff;
}
.pm-option:hover { border-color: #93c5fd; }
.pm-option.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.pm-option .pm-icon {
    width: 42px; height: 42px; border-radius: 10px; background: #f1f5f9; color: #2563eb;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.pm-option.selected .pm-icon { background: #2563eb; color: #fff; }
.pm-option .pm-name { font-weight: 700; color: #1e293b; font-size: 0.95rem; }
.pm-option .pm-fees { font-size: 0.75rem; color: #64748b; }
.pm-option .pm-badge { margin-left: auto; font-size: 0.68rem; background: #dcfce7; color: #166534; padding: 3px 8px; border-radius: 12px; font-weight: 700; }
.pm-option .pm-badge.gateway { background: #e0f2fe; color: #075985; }
.pm-summary { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 15px; margin-bottom: 15px; }
.pm-summary .row { display: flex; justify-content: space-between; font-size: 0.88rem; color: #475569; padding: 4px 0; }
.pm-summary .row.total { border-top: 2px dashed #cbd5e1; margin-top: 8px; padding-top: 10px; font-weight: 800; color: #1e293b; font-size: 1.05rem; }
.pm-summary .row.total .amt { color: #16a34a; }
.pm-details-box { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 12px; font-size: 0.85rem; white-space: pre-line; margin-bottom: 15px; }

/* ---------- Share Buttons ---------- */
.share-grid { display: flex; justify-content: center; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.share-btn {
    width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.05rem; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; border: none;
}
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.share-fb { background: #1877f2; } .share-x { background: #0f1419; } .share-wa { background: #25d366; }
.share-in { background: #0a66c2; } .share-tg { background: #229ed9; } .share-mail { background: #64748b; } .share-copy { background: #7c3aed; }

/* ---------- Views badge ---------- */
.views-badge {
    display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.15);
    padding: 4px 12px; border-radius: 20px; font-size: 0.9rem;
}

/* ---------- Verified seller badge (Point 4) ---------- */
.verified-badge {
    display: inline-flex; align-items: center; gap: 4px; color: #4ade80;
    font-size: 0.85rem; font-weight: 700;
}
.verified-badge i { font-size: 1rem; }

/* ---------- Dual currency display (Point 6) ---------- */
.money { white-space: nowrap; }
.money .money-sub { display: block; font-size: 0.72em; color: #94a3b8; font-weight: 500; }
.cur-toggle {
    background: rgba(11,145,226,0.1); border: 1px solid rgba(11,145,226,0.35); color: var(--primary, #0B91E2);
    border-radius: 20px; padding: 4px 12px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s;
}
.cur-toggle:hover { background: rgba(11,145,226,0.2); }

/* ---------- Home: modern search bar (Point 2) ---------- */
.search-hero {
    background: #fff; border-radius: 50px; padding: 8px; display: flex; gap: 8px; align-items: center;
    box-shadow: 0 15px 35px -10px rgba(11,145,226,0.25), 0 0 0 1px #e5f2fb;
    max-width: 720px; margin: 0 auto;
}
.search-hero .si-icon {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #0B91E2, #3DB2F5); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.search-hero input {
    flex: 1; border: none; outline: none; font-size: 1.02rem; padding: 10px 5px; margin: 0; background: transparent;
    min-width: 0;
}
.search-hero button {
    border: none; cursor: pointer; border-radius: 30px; padding: 12px 30px; font-weight: 700; font-size: 0.95rem;
    background: linear-gradient(135deg, #0B91E2, #0878BC); color: #fff; transition: all 0.25s; flex-shrink: 0;
}
.search-hero button:hover { box-shadow: 0 8px 20px -5px rgba(11,145,226,0.6); transform: translateY(-1px); }

/* ---------- Home: premium domain cards (Point 2) ---------- */
.dm-card {
    background: #fff; border-radius: 16px; overflow: hidden; position: relative;
    border: 1px solid #e8f1f8; box-shadow: 0 4px 15px -5px rgba(51,58,64,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
}
.dm-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -12px rgba(11,145,226,0.25); border-color: #b8dff7; }
.dm-card .dm-top {
    background: linear-gradient(135deg, #f2f9fe 0%, #e7f4fd 100%);
    padding: 22px 20px 18px; position: relative; border-bottom: 1px solid #e2eff9;
}
.dm-card .dm-top::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #0B91E2, #3DB2F5, transparent);
}
.dm-card .dm-tag {
    display: inline-flex; align-items: center; gap: 5px; font-size: 0.68rem; font-weight: 800;
    letter-spacing: 1px; text-transform: uppercase; color: #0878BC;
    background: #fff; border: 1px solid #cfe9fa; border-radius: 20px; padding: 3px 11px; margin-bottom: 10px;
}
.dm-card .dm-name {
    font-size: 1.3rem; font-weight: 800; color: #2b3238; word-break: break-all; line-height: 1.25;
}
.dm-card .dm-name i { color: #0B91E2; font-size: 1rem; margin-right: 6px; }
.dm-card .dm-body { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.dm-card .dm-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.dm-card .dm-cat {
    font-size: 0.72rem; font-weight: 700; color: #0878BC; background: #eaf6fe;
    border-radius: 6px; padding: 4px 10px;
}
.dm-card .dm-views { font-size: 0.75rem; color: #94a3b8; }
.dm-card .dm-est {
    display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: #64748b;
    background: #f8fbfe; border: 1px dashed #d9ebf8; border-radius: 8px; padding: 8px 12px; margin-bottom: 16px;
}
.dm-card .dm-est b { color: #16a34a; }
.dm-card .dm-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.dm-card .dm-price { font-size: 1.3rem; font-weight: 800; color: #16a34a; line-height: 1.1; }
.dm-card .dm-price .money-sub { font-size: 0.6em; }
.dm-card .dm-btn {
    background: linear-gradient(135deg, #0B91E2, #0878BC); color: #fff; border-radius: 24px;
    padding: 9px 20px; font-size: 0.85rem; font-weight: 700; transition: all 0.25s; white-space: nowrap;
}
.dm-card .dm-btn:hover { box-shadow: 0 8px 18px -4px rgba(11,145,226,0.55); transform: translateY(-1px); }

/* ---------- Auth pages (Points 8 & 9) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 15px; position: relative; }
.auth-bg {
    position: fixed; inset: 0; z-index: -1;
    background: linear-gradient(135deg, #33383E 0%, #24282C 60%, #0B91E2 180%);
}
.auth-bg::before, .auth-bg::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(10px); opacity: 0.35;
}
.auth-bg::before { width: 380px; height: 380px; background: radial-gradient(circle, #0B91E2, transparent 70%); top: -110px; right: -80px; }
.auth-bg::after { width: 300px; height: 300px; background: radial-gradient(circle, #3DB2F5, transparent 70%); bottom: -90px; left: -70px; }
.auth-card {
    background: #fff; border-radius: 18px; padding: 38px 34px; width: 100%; max-width: 420px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.45);
}
.auth-card .auth-logo { text-align: center; margin-bottom: 18px; }
.auth-card .auth-logo img { max-height: 52px; }
.auth-card .auth-logo .logo-text { font-size: 1.5rem; font-weight: 800; color: #0B91E2; }
.auth-card h2 { text-align: center; color: #2b3238; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; color: #94a3b8; font-size: 0.9rem; margin-bottom: 24px; }
.auth-card label { font-size: 0.85rem; font-weight: 600; color: #475569; }
.auth-card .input-icon { position: relative; }
.auth-card .input-icon i { position: absolute; left: 14px; top: 15px; color: #94a3b8; font-size: 0.95rem; }
.auth-card .input-icon input { padding-left: 40px; }
.auth-btn {
    width: 100%; border: none; cursor: pointer; border-radius: 10px; padding: 13px; font-size: 1rem; font-weight: 700;
    background: linear-gradient(135deg, #0B91E2, #0878BC); color: #fff; transition: all 0.25s;
}
.auth-btn:hover { box-shadow: 0 10px 25px -6px rgba(11,145,226,0.6); }
.auth-home-btn {
    position: absolute; top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); color: #fff;
    padding: 9px 18px; border-radius: 24px; font-size: 0.88rem; font-weight: 600; transition: all 0.2s; z-index: 5;
}
.auth-home-btn:hover { background: rgba(255,255,255,0.25); }

/* ---------- Login-required popup (Point 9) ---------- */
.lr-actions { display: flex; gap: 10px; margin-top: 18px; }
.lr-actions a {
    flex: 1; text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 0.95rem;
}
.lr-login { background: linear-gradient(135deg, #0B91E2, #0878BC); color: #fff; }
.lr-register { background: #f1f5f9; color: #333a40; border: 1px solid #e2e8f0; }

/* ---------- Admin: Home section manager (Point 3) ---------- */
.hs-item {
    display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 12px 15px; margin-bottom: 10px;
}
.hs-item.hs-disabled { opacity: 0.55; background: #f8fafc; }
.hs-item .hs-icon {
    width: 38px; height: 38px; border-radius: 9px; background: #eaf6fe; color: #0878BC;
    display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.hs-item .hs-info { flex: 1; min-width: 0; }
.hs-item .hs-info b { display: block; color: #1e293b; font-size: 0.92rem; }
.hs-item .hs-info small { color: #94a3b8; font-size: 0.75rem; }
.hs-item .hs-actions { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }
.hs-item .hs-actions button {
    border: 1px solid #e2e8f0; background: #fff; color: #475569; width: 32px; height: 32px;
    border-radius: 7px; cursor: pointer; font-size: 0.8rem; transition: all 0.15s;
}
.hs-item .hs-actions button:hover { background: #eaf6fe; color: #0878BC; border-color: #b8dff7; }
.hs-item .hs-actions button.hs-del:hover { background: #fee2e2; color: #dc2626; border-color: #fecaca; }

/* ============================================================
   100% Mobile Responsive (Point 11) — site + admin + user panels
   ============================================================ */
@media (max-width: 767px) {
    /* Tables scroll horizontally inside cards instead of breaking layout */
    .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .dash-content .card table, #tab-users table, #tab-domains table { min-width: 620px; }

    /* Dashboard sidebars become compact horizontal pill menus */
    .dashboard-layout .sidebar { min-height: auto !important; padding: 12px !important; }
    .dashboard-layout .sidebar ul { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .dashboard-layout .sidebar li { white-space: nowrap; margin-bottom: 0 !important; border-left: none !important; padding: 9px 14px !important; flex-shrink: 0; }
    .dashboard-layout .sidebar li.active { border-left: none !important; border-bottom: 3px solid #3DB2F5 !important; }
    .dashboard-layout .sidebar .user-profile-info { margin-bottom: 12px; padding-bottom: 12px; }

    /* Typography scale-down */
    .hero h1, .domain-title-large { font-size: 1.7rem !important; }
    .hero { padding: 55px 15px !important; }
    .domain-meta-large { flex-wrap: wrap; gap: 8px !important; font-size: 0.92rem !important; }

    /* Modals fill small screens comfortably */
    .modal-content-card, .aiw-confirm-box { padding: 20px !important; }

    /* Grid columns already stack via .grid-2/.grid-3; span fixes */
    [style*="grid-column: span 2"] { grid-column: span 1 !important; }

    /* Search hero stacks nicely */
    .search-hero { border-radius: 16px; flex-wrap: wrap; padding: 12px; }
    .search-hero input { flex: 1 1 100%; order: 1; padding: 10px 12px; }
    .search-hero .si-icon { display: none; }
    .search-hero button { flex: 1 1 100%; order: 2; }

    /* Buy modal & embed designer fit */
    .pm-option { padding: 10px 12px; }
    .embed-designer .ed-sizes { flex-wrap: wrap; }

    /* Stats/CTA sections */
    .stats-section h2 { font-size: 1.9rem !important; }
    section[style*="padding: 100px 0"] { padding: 60px 0 !important; }
    section[style*="padding: 80px 0"] { padding: 50px 0 !important; }
}

@media (max-width: 420px) {
    .dm-card .dm-foot { flex-direction: column; align-items: stretch; text-align: center; }
    .dm-card .dm-btn { width: 100%; }
    .aiw-confirm-actions { flex-direction: column; }
    #aiw-notify-container { max-width: calc(100% - 24px); right: 12px; top: 12px; }
}
