/**
 * HostBreak Domain Pricing - Hybrid Layout
 * Version: 3.1
 * Features: Featured Cards (same size) + Accordion Table
 */

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */
:root {
    --hb-primary: #667eea;
    --hb-primary-dark: #5a67d8;
    --hb-primary-light: rgba(102, 126, 234, 0.1);
    --hb-secondary: #764ba2;
    --hb-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hb-gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    --hb-text-dark: #1e293b;
    --hb-text-medium: #475569;
    --hb-text-light: #94a3b8;
    
    --hb-bg-white: #ffffff;
    --hb-bg-light: #f8fafc;
    
    --hb-border: #e2e8f0;
    --hb-border-light: #f1f5f9;
    
    --hb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --hb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --hb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --hb-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --hb-shadow-primary: 0 10px 30px -5px rgba(102, 126, 234, 0.4);
    
    --hb-radius-sm: 6px;
    --hb-radius-md: 8px;
    --hb-radius-lg: 12px;
    --hb-radius-xl: 16px;
    --hb-radius-full: 9999px;
    
    --hb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BASE WRAPPER
   ========================================================================== */
.domain-pricing-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--hb-text-dark);
}

/* ==========================================================================
   FEATURED CARDS SECTION (ABOVE SEARCH)
   ========================================================================== */
.hb-featured-cards {
    margin-bottom: 32px;
}

.hb-featured-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ==========================================================================
   INDIVIDUAL FEATURED CARD - ALL SAME SIZE
   ========================================================================== */
.hb-featured-card {
    background: var(--hb-bg-white);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-xl);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: var(--hb-transition);
    box-shadow: var(--hb-shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.hb-featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hb-gradient);
    opacity: 0;
    transition: var(--hb-transition);
}

.hb-featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hb-shadow-xl);
    border-color: var(--hb-primary);
}

.hb-featured-card:hover::before {
    opacity: 1;
}

/* Primary Card - Same size, different colors */
.hb-featured-card--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    box-shadow: var(--hb-shadow-primary);
}

.hb-featured-card--primary::before {
    display: none;
}

.hb-featured-card--primary:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -5px rgba(102, 126, 234, 0.5);
}

.hb-featured-card--primary .hb-featured-card__badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.hb-featured-card--primary .hb-featured-card__domain,
.hb-featured-card--primary .hb-featured-card__currency,
.hb-featured-card--primary .hb-featured-card__amount,
.hb-featured-card--primary .hb-featured-card__period,
.hb-featured-card--primary .hb-featured-card__tagline {
    color: white;
}

.hb-featured-card--primary .hb-featured-card__cta {
    background: white;
    color: var(--hb-primary);
}

.hb-featured-card--primary .hb-featured-card__cta:hover {
    background: var(--hb-bg-light);
    transform: translateY(-2px);
}

/* Badge */
.hb-featured-card__badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--hb-gradient-gold);
    color: white;
    border-radius: var(--hb-radius-full);
    margin-bottom: 16px;
    align-self: center;
}

/* Domain Name */
.hb-featured-card__domain {
    font-size: 36px;
    font-weight: 800;
    color: var(--hb-text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

/* Price */
.hb-featured-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.hb-featured-card__currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--hb-text-medium);
}

.hb-featured-card__amount {
    font-size: 42px;
    font-weight: 800;
    color: var(--hb-text-dark);
    line-height: 1;
}

.hb-featured-card__period {
    font-size: 14px;
    font-weight: 500;
    color: var(--hb-text-light);
}

/* Tagline */
.hb-featured-card__tagline {
    font-size: 14px;
    color: var(--hb-text-medium);
    margin: 0 0 auto 0;
    padding-bottom: 20px;
}

/* CTA Button */
.hb-featured-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--hb-gradient);
    border: none;
    border-radius: var(--hb-radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--hb-transition);
    margin-top: auto;
}

.hb-featured-card__cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--hb-shadow-primary);
    color: white;
}

.hb-featured-card__cta svg {
    transition: transform 0.2s ease;
}

.hb-featured-card__cta:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   SEARCH & FILTERS BAR
   ========================================================================== */
.domain-pricing-wrapper .domain-search-filters {
    background: var(--hb-bg-white) !important;
    border: 1px solid var(--hb-border) !important;
    border-radius: var(--hb-radius-lg) !important;
    padding: 20px 24px !important;
    margin-bottom: 24px !important;
    box-shadow: var(--hb-shadow-sm) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

.domain-pricing-wrapper .domain-search-filters .search-box {
    flex: 1 !important;
    min-width: 250px !important;
    position: relative !important;
}

.domain-pricing-wrapper .domain-search-filters .search-box i {
    position: absolute !important;
    left: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--hb-text-light) !important;
    font-size: 14px !important;
    z-index: 1 !important;
}

.domain-pricing-wrapper .domain-search-filters .search-box input {
    width: 100% !important;
    padding: 14px 16px 14px 44px !important;
    font-size: 15px !important;
    border: 1px solid var(--hb-border) !important;
    border-radius: var(--hb-radius-md) !important;
    background: var(--hb-bg-light) !important;
    color: var(--hb-text-dark) !important;
    transition: var(--hb-transition) !important;
}

.domain-pricing-wrapper .domain-search-filters .search-box input:focus {
    outline: none !important;
    border-color: var(--hb-primary) !important;
    background: var(--hb-bg-white) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
}

.domain-pricing-wrapper .domain-search-filters .filter-select {
    padding: 14px 40px 14px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: 1px solid var(--hb-border) !important;
    border-radius: var(--hb-radius-md) !important;
    background-color: var(--hb-bg-white) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    color: var(--hb-text-dark) !important;
    cursor: pointer !important;
    appearance: none !important;
    min-width: 140px !important;
}

.domain-pricing-wrapper .domain-search-filters .search-btn {
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: var(--hb-gradient) !important;
    border: none !important;
    border-radius: var(--hb-radius-md) !important;
    cursor: pointer !important;
    transition: var(--hb-transition) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.domain-pricing-wrapper .domain-search-filters .search-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--hb-shadow-primary) !important;
}

.domain-pricing-wrapper .domain-search-filters .search-btn i {
    position: static !important;
    transform: none !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ACCORDION TABLE SECTION
   ========================================================================== */
.hb-accordion-table {
    background: var(--hb-bg-white);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-xl);
    overflow: hidden;
    box-shadow: var(--hb-shadow-md);
}

.hb-accordion-table__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--hb-bg-light);
    border-bottom: 1px solid var(--hb-border);
}

.hb-accordion-table__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--hb-text-dark);
    margin: 0;
}

.hb-accordion-table__count {
    font-size: 14px;
    color: var(--hb-text-light);
    background: var(--hb-bg-white);
    padding: 6px 12px;
    border-radius: var(--hb-radius-full);
    border: 1px solid var(--hb-border);
}

.hb-accordion-table__wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   DOMAIN TABLE
   ========================================================================== */
.hb-domain-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.hb-domain-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.hb-domain-table thead tr {
    background: var(--hb-bg-light);
}

.hb-domain-table thead th {
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hb-text-light);
    text-align: left;
    border-bottom: 1px solid var(--hb-border);
    white-space: nowrap;
}

.hb-domain-table thead th:first-child {
    padding-left: 24px;
}

.hb-domain-table thead th:last-child {
    padding-right: 24px;
    text-align: right;
}

/* Table Rows */
.hb-domain-table tbody tr {
    background: var(--hb-bg-white);
    border-bottom: 1px solid var(--hb-border-light);
    transition: var(--hb-transition);
}

.hb-domain-table tbody tr:last-child {
    border-bottom: none;
}

.hb-domain-table tbody tr:hover {
    background: var(--hb-primary-light);
}

.hb-domain-table tbody td {
    padding: 18px 16px;
    font-size: 14px;
    color: var(--hb-text-dark);
    vertical-align: middle;
}

.hb-domain-table tbody td:first-child {
    padding-left: 24px;
}

.hb-domain-table tbody td:last-child {
    padding-right: 24px;
    text-align: right;
}

/* Hidden Row */
.hb-row--hidden {
    display: none !important;
}

/* Fade in animation */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hb-domain-table tbody tr:not(.hb-row--hidden) {
    animation: fadeInRow 0.3s ease forwards;
}

/* ==========================================================================
   TABLE CELL ELEMENTS
   ========================================================================== */
.hb-extension-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hb-extension-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--hb-text-dark);
}

.hb-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--hb-text-dark);
}

.hb-price-na {
    color: var(--hb-text-light);
    font-weight: 400;
}

/* Badges */
.hb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: var(--hb-radius-full);
    white-space: nowrap;
}

.hb-badge--hot {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
}

.hb-badge--new {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
}

.hb-badge--sale {
    background: var(--hb-gradient);
    color: white;
}

.hb-badge--protect {
    background: var(--hb-bg-light);
    color: var(--hb-text-medium);
    border: 1px solid var(--hb-border);
}

/* Action Buttons */
.hb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.hb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--hb-radius-md);
    transition: var(--hb-transition);
    cursor: pointer;
    white-space: nowrap;
}

.hb-btn--primary {
    background: var(--hb-gradient);
    color: white !important;
    border: none;
}

.hb-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hb-shadow-primary);
    color: white !important;
}

.hb-btn--outline {
    background: var(--hb-bg-white);
    color: var(--hb-primary) !important;
    border: 1px solid var(--hb-primary);
}

.hb-btn--outline:hover {
    background: var(--hb-primary-light);
    color: var(--hb-primary-dark) !important;
}

/* ==========================================================================
   VIEW ALL BUTTON
   ========================================================================== */
.hb-accordion-table__footer {
    padding: 24px;
    text-align: center;
    background: var(--hb-bg-light);
    border-top: 1px solid var(--hb-border);
}

.hb-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    color: var(--hb-primary);
    background: var(--hb-bg-white);
    border: 2px solid var(--hb-primary);
    border-radius: var(--hb-radius-lg);
    cursor: pointer;
    transition: var(--hb-transition);
}

.hb-view-all-btn:hover {
    background: var(--hb-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hb-shadow-primary);
}

.hb-view-all-btn__icon {
    transition: transform 0.2s ease;
}

.hb-view-all-btn:hover .hb-view-all-btn__icon {
    transform: translateY(4px);
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.hb-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--hb-bg-white);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-xl);
}

.hb-empty-state__icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.hb-empty-state__text {
    font-size: 16px;
    color: var(--hb-text-light);
    margin: 0;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */
#loading-icon-domain {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
}

#loading-icon-domain::after {
    content: "";
    width: 48px;
    height: 48px;
    border: 3px solid var(--hb-border);
    border-top-color: var(--hb-primary);
    border-radius: 50%;
    animation: hb-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */
@media (max-width: 1024px) {
    .hb-featured-cards__grid {
        gap: 16px;
    }
    
    .hb-featured-card {
        padding: 24px 20px;
        min-height: 300px;
    }
    
    .hb-featured-card__domain {
        font-size: 28px;
    }
    
    .hb-featured-card__amount {
        font-size: 36px;
    }
    
    /* Hide some table columns */
    .hb-domain-table thead th:nth-child(3),
    .hb-domain-table tbody td:nth-child(3),
    .hb-domain-table thead th:nth-child(4),
    .hb-domain-table tbody td:nth-child(4) {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    .domain-pricing-wrapper {
        padding: 24px 16px;
    }
    
    /* Search filters stack */
    .domain-pricing-wrapper .domain-search-filters {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .domain-pricing-wrapper .domain-search-filters .search-box {
        width: 100% !important;
        min-width: unset !important;
    }
    
    .domain-pricing-wrapper .domain-search-filters .filter-select,
    .domain-pricing-wrapper .domain-search-filters .search-btn {
        width: 100% !important;
    }
    
    /* Featured cards stack */
    .hb-featured-cards__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hb-featured-card {
        min-height: auto;
        padding: 24px 20px;
    }
    
    .hb-featured-card--primary {
        order: -1; /* Move primary card to top on mobile */
    }
    
    .hb-featured-card__domain {
        font-size: 32px;
    }
    
    .hb-featured-card__amount {
        font-size: 36px;
    }
    
    /* Table header */
    .hb-accordion-table__header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* Table becomes cards on mobile */
    .hb-domain-table {
        min-width: unset;
    }
    
    .hb-domain-table thead {
        display: none;
    }
    
    .hb-domain-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .hb-domain-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--hb-bg-white);
        border: 1px solid var(--hb-border);
        border-radius: var(--hb-radius-lg);
        padding: 16px;
        box-shadow: var(--hb-shadow-sm);
    }
    
    .hb-domain-table tbody tr:hover {
        border-color: var(--hb-primary);
        box-shadow: var(--hb-shadow-md);
    }
    
    .hb-domain-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid var(--hb-border-light);
    }
    
    .hb-domain-table tbody td:first-child {
        padding-left: 0;
        padding-bottom: 12px;
        margin-bottom: 8px;
        border-bottom: 2px solid var(--hb-border);
    }
    
    .hb-domain-table tbody td:last-child {
        padding-right: 0;
        padding-top: 12px;
        border-bottom: none;
        margin-top: 8px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .hb-domain-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 600;
        color: var(--hb-text-light);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .hb-domain-table tbody td:first-child::before,
    .hb-domain-table tbody td:last-child::before {
        display: none;
    }
    
    .hb-actions {
        width: 100%;
        justify-content: center;
    }
    
    .hb-btn {
        flex: 1;
        justify-content: center;
    }
    
    .hb-view-all-btn {
        max-width: 100%;
    }
}

/* ==========================================================================
   MOBILE FIXES - Show More button & Transfer button visibility
   Added for mobile support
   ========================================================================== */

/* Show More button count text */
.hb-view-all-btn__count {
    color: var(--hb-text-light);
    font-weight: 400;
    margin-left: 4px;
}

/* Expanded state for Show More button */
.hb-view-all-btn.expanded {
    background: var(--hb-primary);
    color: white;
}

.hb-view-all-btn.expanded .hb-view-all-btn__icon {
    transform: rotate(180deg);
}

/* Transfer table - show all columns */
.hb-transfer-table thead th:nth-child(3),
.hb-transfer-table tbody td:nth-child(3),
.hb-transfer-table thead th:nth-child(4),
.hb-transfer-table tbody td:nth-child(4) {
    display: table-cell !important;
}

/* ==========================================================================
   MOBILE: Ensure buttons show properly
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Show More button visible on mobile */
    .hb-accordion-table__footer {
        display: block !important;
        padding: 16px !important;
    }
    
    .hb-view-all-btn {
        display: inline-flex !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Transfer Now button visible on mobile */
    .hb-transfer-action {
        display: flex !important;
        width: 100% !important;
    }
    
    .hb-transfer-action .hb-actions {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .hb-transfer-btn {
        display: inline-flex !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
    }
    
    /* Action buttons full width on mobile */
    .hb-domain-table tbody td:last-child .hb-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .hb-domain-table tbody td:last-child .hb-btn {
        width: 100%;
        justify-content: center;
    }
}
