/**
 * States Grid Styles
 * Compact, inline layout with clickable box styling for displaying company locations
 *
 * @package WP_Company_Manager
 * @author WebFX
 */

.location-list {
    display: none !important;
}

/* Container and Title */
.wpcm-states-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.wpcm-states-grid-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 50px 0;
    line-height: 1.2;
}

/* Grid Layout */
.wpcm-states-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(4, 1fr);
}

/* Dynamic column support */
.wpcm-states-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.wpcm-states-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.wpcm-states-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.wpcm-states-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

/* State Item */
.wpcm-state-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px 30px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.wpcm-state-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #E8E8E8;
}

.wpcm-state-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.wpcm-state-link:hover {
    text-decoration: none;
    color: inherit;
}

/* State Image */
.wpcm-state-image {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 4px;
    padding: 6px;
}

.wpcm-state-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* State Info */
.wpcm-state-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    flex-grow: 1;
    gap: 4px;
}

.wpcm-state-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
    transition: font-weight 0.2s ease;
}

.wpcm-state-item:hover .wpcm-state-name {
    font-weight: 700;
}

.wpcm-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--link_color);
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.wpcm-state-item:hover .wpcm-learn-more {
    color: var(--link_color);
    font-weight: 600;
}

.wpcm-arrow {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.wpcm-state-item:hover .wpcm-arrow {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpcm-states-grid-container {
        padding: 30px 15px;
    }
    
    .wpcm-states-grid-title {
        font-size: 2rem;
        margin: 0 0 30px 0;
    }
    
    .wpcm-states-grid {
        gap: 12px;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wpcm-states-grid[data-columns="2"],
    .wpcm-states-grid[data-columns="3"],
    .wpcm-states-grid[data-columns="4"],
    .wpcm-states-grid[data-columns="5"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wpcm-state-item {
        padding: 22px 25px;
    }
    
    .wpcm-state-image {
        width: 55px;
        height: 55px;
    }
    
    .wpcm-state-name {
        font-size: 1.1rem;
    }
    
    .wpcm-learn-more {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .wpcm-states-grid-container {
        padding: 20px 10px;
    }
    
    .wpcm-states-grid-title {
        font-size: 1.75rem;
        margin: 0 0 25px 0;
    }
    
    .wpcm-states-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .wpcm-states-grid[data-columns="2"],
    .wpcm-states-grid[data-columns="3"],
    .wpcm-states-grid[data-columns="4"],
    .wpcm-states-grid[data-columns="5"] {
        grid-template-columns: 1fr;
    }
    
    .wpcm-state-item {
        padding: 18px 22px;
    }
    
    .wpcm-state-image {
        width: 50px;
        height: 50px;
    }
    
    .wpcm-state-name {
        font-size: 1rem;
    }
    
    .wpcm-learn-more {
        font-size: 0.8rem;
    }
}

/* Accessibility */
.wpcm-state-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
    border-radius: 8px;
}

.wpcm-state-link:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .wpcm-states-grid {
        display: block;
    }
    
    .wpcm-state-item {
        break-inside: avoid;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        box-shadow: none;
        transform: none;
    }
    
    .wpcm-learn-more {
        color: #000 !important;
    }
    
    .wpcm-arrow {
        display: none;
    }
} 