/* Bulk shared components */

/* Stats bar */
.stats-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}
.stat-sep { margin: 0 15px; opacity: .5; }
.stat-highlight { color: #fff; font-weight: 700; }

/* Filters */
.filters-bar {
    background: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    top: 60px;
    z-index: 100;
}
.filter-group { display: flex; gap: 10px; align-items: center; }
.filter-label { color: var(--gray); font-size: var(--font-size-sm); font-weight: 600; }
.filter-btn {
    padding: 5px 14px;
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: .2s;
}
.filter-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.filter-btn.active { background: var(--gradient-main); color: #fff; border-color: transparent; }
.filter-btn:hover:not(.active) { border-color: var(--primary); }

/* List layout */
.dk-list-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.dk-list-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 12px 20px;
    margin-bottom: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}
.dk-list-domain {
    flex: 0 0 260px;
    font-weight: 600;
    font-size: var(--font-size-lg);
    color: var(--dark);
    word-break: break-all;
    line-height: 1.4;
}
.dk-list-domain .dk-list-tld { color: var(--primary); }
.dk-list-content {
    flex: 1;
    display: flex;
    gap: 30px;
    padding: 0 10px;
    font-weight: 500;
    color: var(--gray);
    font-size: var(--font-size-base);
    align-items: center;
    justify-content: center;
}
.dk-list-actions {
    flex: 0 0 210px;
    display: flex;
    gap: 8px;
    font-weight: 600;
    justify-content: flex-end;
    font-size: var(--font-size-lg);
}

/* Buttons */
.btn-lookup {
    background: var(--global-btn-dropdown, #e5e7eb);
    color: #374151;
    border: none;
    border-radius: 4px;
    width: 100%;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
    text-align: center;
    position: relative;
    line-height: 1.5;
}
.btn-lookup::after { content: '▼'; font-size: 10px; margin-left: 4px; transition: transform 0.2s; }
.btn-lookup:hover { background: #d1d5db; color: #1f2937; }
.btn-lookup:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-action {
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    flex: 1;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: .2s;
    text-align: center;
    line-height: 1.5;
}
.btn-action.price { background: var(--global-btn-price); }
.btn-action.offer { background: var(--global-btn-offer); }
.btn-action.check { background: var(--global-btn-check); }
.btn-action.register { background: var(--global-btn-register); }
.btn-action.expired { background: var(--global-btn-expired); }
.btn-action.whois { background: var(--global-btn-dropdown); }
.btn-action.verify { background: var(--global-btn-verify); }
.btn-action:hover { transform: scale(1.02); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.btn-action:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Dropdown */
.lookup-dropdown { position: relative; display: inline-block; }
.lookup-dropdown.dropdown-active { z-index: 10000; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    display: none;
    min-width: 140px;
}
.dropdown-menu.show { display: block; animation: slideDown 0.15s ease-out; z-index: 10001; }
.dropdown-item {
    display: block;
    padding: 8px 12px;
    color: #374151;
    text-decoration: none;
    font-size: 12px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f3f4f6;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background-color: #f9fafb; color: var(--primary); }
.dropdown-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Back to top */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    transition: .3s;
    z-index: 999;
}
.back-to-top.show { display: flex; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.back-to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Loading */
.loading-initial {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    grid-column: 1/-1;
}

/* List responsive */
@media (max-width: 768px) {
    .dk-list-card { padding: 10px; }
    .dk-list-domain { flex: 0 0 150px; font-size: 14px; }
    .dk-list-actions { flex: 1; max-width: 180px; }
    .filters-bar { gap: 15px; padding: 10px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    .filter-group { display: inline-flex; justify-content: center; }
    .btn-lookup, .btn-action { font-size: 11px; padding: 6px 8px; }
    .dropdown-menu { min-width: 120px; }
    .dropdown-item { padding: 6px 10px; font-size: 11px; }
}
@media (max-width: 480px) {
    .dk-list-card { padding: 8px; margin-bottom: 6px; }
    .dk-list-domain { flex: 1; font-size: 13px; }
    .dk-list-actions { flex: 0 0 150px; gap: 4px; }
    .dk-list-actions .btn-lookup, .dk-list-actions .btn-action { font-size: 11px; padding: 5px 8px; }
}

/* ==================== */
/* Bulk shared styles   */
/* ==================== */

/* Input area */
.bulk-search-container { max-width: 700px; }

.bulk-input-area {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--focus-shadow, 0 25px 50px rgba(0, 0, 0, 0.08));
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.input-label {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary, var(--dark));
}

/* Counter */
.keyword-counter {
    font-size: var(--font-size-sm);
    color: var(--gray);
    font-weight: 500;
    padding: 4px 12px;
    background: var(--primary-bg-1, #f3f4f6);
    border-radius: 20px;
}
.keyword-counter.warning { background: #fef3c7; color: var(--warning); }
.keyword-counter.error { background: #fee2e2; color: var(--error); }

/* Textarea */
.bulk-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    max-height: 400px;
    transition: var(--transition-base);
    background: var(--primary-bg-1, #f9fafb);
}
.bulk-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 0, 0, 0), 0.1);
}

/* Button group */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--light-gray, #f3f4f6);
    color: var(--text-primary, var(--dark));
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}
.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--primary);
}
.btn-secondary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Table header */
.bulk-table-header {
    background: var(--primary-bg-2, #f3f4f6) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    color: var(--text-primary, var(--dark));
}

/* Skeleton loading */
.bulk-result-row.skeleton .dk-list-content span,
.bulk-result-row.skeleton .dk-list-actions span {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 16px;
    display: inline-block;
    min-width: 40px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Bulk stat */
.bulk-stat {
    text-align: left;
    font-weight: 600;
}

/* Validation error */
.validation-error {
    margin-top: 12px;
    padding: 10px;
    background: #fee2e2;
    color: var(--error);
    border-radius: 6px;
    font-size: var(--font-size-sm);
}

/* Bulk responsive */
@media (max-width: 768px) {
    .bulk-search-container { max-width: 100%; }
    .bulk-input-area { padding: 16px; }
    .button-group { flex-direction: column; }
    .btn-secondary, .search-btn { width: 100%; }
}
