/**
 * Baby Names Public Styles
 * Modern, responsive design with purple/orchid theme
 * Prefix: bn- (baby names) to avoid conflicts
 */

/* ==========================================================================
   Base Wrapper
   ========================================================================== */

.bn-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   Search Box
   ========================================================================== */

.bn-search-box {
    margin-bottom: 30px;
}

.bn-form {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bn-search-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bn-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.bn-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bn-search-button {
    padding: 14px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bn-search-button:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bn-search-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   Gender Toggle
   ========================================================================== */

.bn-gender-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.bn-radio-label {
    flex: 1;
    cursor: pointer;
}

.bn-radio-label input[type="radio"] {
    display: none;
}

.bn-radio-label span {
    display: block;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.bn-radio-label:hover span {
    border-color: #c0c0c0;
}

.bn-radio-label.active.bn-radio-boy span {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

.bn-radio-label.active.bn-radio-girl span {
    background: #da70d6;
    color: white;
    border-color: #da70d6;
}

/* ==========================================================================
   Navigation - Alphabet & Numerology
   ========================================================================== */

.bn-navigation {
    margin-bottom: 30px;
}

.bn-nav-section {
    margin-bottom: 25px;
}

.bn-nav-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.bn-alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bn-tamil-alphabet {
    overflow-x: auto;
    padding-bottom: 5px;
}

.bn-letter-btn,
.bn-number-btn {
    min-width: 40px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bn-letter-btn:hover,
.bn-number-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
}

.bn-letter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.bn-number-btn.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
}

/* Tamil letters - larger font */
.bn-tamil-alphabet .bn-letter-btn {
    font-size: 18px;
    min-width: 45px;
}

/* ==========================================================================
   Results Container
   ========================================================================== */

.bn-results-container {
    margin-top: 30px;
}

.bn-results-header {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
}

/* ==========================================================================
   Table View (Desktop)
   ========================================================================== */

.bn-table-wrapper {
    display: block;
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bn-table {
    width: 100%;
    border-collapse: collapse;
}

.bn-table thead {
    background: #f8f9fa;
}

.bn-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.bn-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.bn-table tbody tr:hover {
    background: #f8f9fa;
}

.bn-name-cell strong {
    color: #667eea;
    font-size: 16px;
}

.bn-tamil-col {
    width: 150px;
}

.bn-tamil-text {
    font-size: 18px;
    font-weight: 500;
    color: #764ba2;
}

.bn-num-col {
    width: 100px;
}

.bn-center {
    text-align: center;
}

.bn-numerology-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #764ba2;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.bn-numerology-unknown {
    color: #999;
}

/* ==========================================================================
   Card View (Mobile) - Hidden by default
   ========================================================================== */

.bn-cards-wrapper {
    display: none;
}

.bn-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
}

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

.bn-card-name {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.bn-card-numerology {
    display: inline-block;
    padding: 6px 12px;
    background: #764ba2;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.bn-card-tamil {
    font-size: 20px;
    font-weight: 500;
    color: #764ba2;
    margin-bottom: 12px;
}

.bn-card-meaning {
    color: #555;
    line-height: 1.6;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.bn-pagination {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bn-pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.bn-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Increased from 8px */
    flex-wrap: wrap;
}

.bn-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    margin: 2px; /* Added margin for extra spacing */
}

.bn-page-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
}

.bn-page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    cursor: default;
    pointer-events: none; /* Prevent clicks on active button */
}

.bn-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.bn-page-prev,
.bn-page-next {
    padding: 0 20px;
    font-weight: 600;
    margin: 0 5px; /* Extra margin for prev/next buttons */
}

.bn-page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px; /* Added margin around page numbers */
}

.bn-page-ellipsis {
    padding: 0 8px;
    color: #999;
    font-weight: 600;
}

/* ==========================================================================
   Responsive Pagination
   ========================================================================== */

@media (max-width: 640px) {
    .bn-pagination {
        padding: 15px;
    }
    
    .bn-pagination-controls {
        gap: 8px;
    }
    
    .bn-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 12px;
        font-size: 14px;
    }
    
    .bn-page-prev,
    .bn-page-next {
        padding: 0 16px;
    }
    
    .bn-page-numbers {
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .bn-page-numbers {
        gap: 4px;
        margin: 0;
    }
    
    .bn-page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        margin: 1px;
    }
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.bn-empty-state {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bn-empty-icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.bn-empty-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bn-empty-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.bn-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 35px;
    border-radius: 12px;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.bn-stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.bn-stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bn-empty-instructions {
    margin-bottom: 40px;
}

.bn-empty-instructions h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
}

.bn-instruction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.bn-instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: left;
    transition: all 0.2s ease;
}

.bn-instruction-item:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.bn-instruction-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bn-instruction-text {
    flex: 1;
}

.bn-instruction-text strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bn-instruction-text p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.bn-empty-cta {
    padding: 30px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-radius: 12px;
    border: 2px dashed #ffc107;
}

.bn-empty-cta-text {
    font-size: 18px;
    font-weight: 600;
    color: #856404;
    margin: 0;
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ==========================================================================
   Empty State - Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .bn-empty-state {
        padding: 40px 20px;
    }
    
    .bn-empty-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .bn-empty-stats {
        gap: 15px;
    }
    
    .bn-stat-card {
        padding: 20px 25px;
        min-width: 120px;
    }
    
    .bn-stat-number {
        font-size: 28px;
    }
    
    .bn-instruction-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bn-empty-instructions h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .bn-empty-state {
        padding: 30px 15px;
    }
    
    .bn-empty-icon svg {
        width: 80px;
        height: 80px;
    }
    
    .bn-stat-card {
        padding: 15px 20px;
    }
    
    .bn-empty-cta-text {
        font-size: 16px;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .bn-wrapper {
        padding: 15px;
    }
    
    .bn-form {
        padding: 20px;
    }
    
    .bn-search-input-wrapper {
        flex-direction: column;
    }
    
    .bn-search-button {
        width: 100%;
    }
    
    .bn-table th,
    .bn-table td {
        padding: 12px 10px;
        font-size: 14px;
    }
    
    .bn-tamil-text {
        font-size: 16px;
    }
}

/* Mobile - Switch to cards */
@media (max-width: 640px) {
    .bn-table-wrapper {
        display: none;
    }
    
    .bn-cards-wrapper {
        display: block;
    }
    
    .bn-gender-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .bn-alphabet-buttons {
        gap: 6px;
    }
    
    .bn-letter-btn,
    .bn-number-btn {
        min-width: 36px;
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .bn-tamil-alphabet .bn-letter-btn {
        font-size: 16px;
        min-width: 40px;
    }
    
    .bn-nav-title {
        font-size: 16px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .bn-wrapper {
        padding: 10px;
    }
    
    .bn-card {
        padding: 16px;
    }
    
    .bn-card-name {
        font-size: 18px;
    }
}