/**
 * Domain Search Pagination Styles
 * Grid layout and pagination controls for domain search results
 */

/* ===== GRID LAYOUT SYSTEM ===== */

.domain-results-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.domain-result-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 120px;
}

.domain-result-item:hover {
    background: #f1f5f9;
    border-color: #e94f43;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 164, 0.15);
}

.domain-result-item .domain-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f2240;
    margin-bottom: 8px;
    word-break: break-all;
    line-height: 1.3;
}

.domain-result-item .domain-status {
    margin-bottom: 8px;
}

.domain-result-item .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-result-item .status-badge.available {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.domain-result-item .status-badge.unavailable {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.domain-result-item .domain-price {
    font-size: 16px;
    font-weight: 700;
    color: #e94f43;
    margin-bottom: 12px;
}

.domain-result-item .domain-actions {
    width: 100%;
}

.domain-result-item .btn-add-domain {
    width: 100%;
    padding: 8px 12px;
    background: #e94f43;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.domain-result-item .btn-add-domain:hover {
    background: #0d9488;
    transform: translateY(-1px);
}

.domain-result-item .btn-add-domain:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* ===== PAGINATION CONTROLS ===== */

.pagination-container {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.pagination-container.w-hidden {
    display: none !important;
}

.pagination-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-pagination {
    padding: 10px 16px;
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-pagination:hover:not(:disabled) {
    background: #e94f43;
    color: white;
    border-color: #e94f43;
    transform: translateY(-1px);
}

.btn-pagination:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-button {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-button:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.page-button.active {
    background: #e94f43;
    color: white;
    border-color: #e94f43;
    font-weight: 700;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #9ca3af;
    font-weight: 500;
}

.pagination-info {
    text-align: center;
}

.current-page-info {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large tablets and small desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .domain-results-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 14px;
        padding: 16px;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .domain-results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 14px;
    }
    
    .pagination-nav {
        gap: 8px;
    }
    
    .btn-pagination {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .page-button {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* Small tablets (576px - 767px) */
@media (max-width: 767px) {
    .domain-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 12px;
    }
    
    .pagination-container {
        padding: 16px;
        margin-top: 20px;
    }
    
    .pagination-controls {
        gap: 12px;
    }
}

/* Mobile devices (up to 575px) */
@media (max-width: 575px) {
    .domain-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    
    .domain-result-item {
        padding: 12px 8px;
        min-height: 100px;
    }
    
    .domain-result-item .domain-name {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .domain-result-item .domain-price {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .pagination-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-numbers {
        order: -1;
        justify-content: center;
    }
    
    .btn-pagination {
        width: 120px;
        justify-content: center;
    }
    
    .page-button {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* ===== UTILITY CLASSES ===== */

.w-hidden {
    display: none !important;
}

/* ===== LOADING STATES ===== */

.pagination-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pagination-loading .pagination-controls::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e2e8f0;
    border-top-color: #e94f43;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ERROR STATES ===== */

.pagination-error {
    padding: 20px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    text-align: center;
    color: #991b1b;
}

.pagination-error .error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.pagination-error .error-message {
    margin-bottom: 15px;
    font-weight: 500;
}

.pagination-error .btn-retry {
    padding: 8px 16px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.pagination-error .btn-retry:hover {
    background: #b91c1c;
}