/* StrongBody Frontend Styles */

/* Grid Layouts */
.strongbody-layout-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.strongbody-layout-grid[data-columns="2"] { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.strongbody-layout-grid[data-columns="3"] { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.strongbody-layout-grid[data-columns="4"] { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.strongbody-layout-grid[data-columns="5"] { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* List Layout */
.strongbody-layout-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

/* Countries */
.strongbody-countries .country-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.strongbody-countries .country-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.country-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 2px;
}

.country-code-flag {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f1;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.country-title {
    display: block;
    font-weight: 500;
    color: #2c3e50;
}

/* Categories */
.strongbody-categories .category-item {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.strongbody-categories .category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.category-icon-wrapper {
    text-align: center;
    margin-bottom: 15px;
}

.category-icon {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.category-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.category-description {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Services */
.strongbody-services .service-item {
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.strongbody-services .service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.service-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.service-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.service-item:hover .service-cover {
    transform: scale(1.05);
}

.service-content {
    padding: 16px;
}

.service-title {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.service-price {
    font-weight: bold;
    color: #27ae60;
    font-size: 1.1em;
}

.service-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-rating {
    display: inline-flex;
    gap: 1px;
}

.star {
    font-size: 14px;
    color: #ffd700;
}

.star-empty {
    color: #ddd;
}

.rating-value {
    font-size: 0.85em;
    color: #666;
}

.service-type,
.service-delivery {
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.8em;
    color: #666;
}

.service-description {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Requests */
.strongbody-requests .request-item {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: background-color 0.2s;
    cursor: pointer;
}

.strongbody-requests .request-item:hover {
    background: #f8f9fa;
}

.request-description {
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.4;
}

.request-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: #666;
}

.request-offers {
    font-weight: 600;
    color: #3498db;
}

.request-attachments {
    margin-top: 8px;
    font-size: 0.8em;
    color: #666;
}

.attachments-count {
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 8px;
}

/* Users */
.strongbody-users .user-item {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.strongbody-users .user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-avatar-wrapper {
    margin-bottom: 12px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 auto;
}

.user-name {
    margin: 0 0 8px 0;
    font-size: 1em;
    font-weight: 600;
    color: #2c3e50;
}

.verification-badge {
    padding: 2px 8px;
    background: #27ae60;
    color: white;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
}

.user-bio {
    margin: 8px 0 0 0;
    color: #666;
    font-size: 0.85em;
    line-height: 1.3;
}

/* Search */
.strongbody-search-wrapper {
    margin: 20px 0;
}

.strongbody-search-form {
    margin-bottom: 20px;
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.search-button {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background: #2980b9;
}

.search-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-type {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.strongbody-search-results {
    margin-top: 20px;
}

.search-instructions,
.search-loading,
.search-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-error {
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

/* Stats */
.strongbody-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.strongbody-stats-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
}

.strongbody-stats-vertical {
    flex-direction: column;
}

.strongbody-stats .stat-item {
    text-align: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 120px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
    display: block;
}

.stat-label {
    color: #666;
    margin-top: 4px;
    font-size: 0.9em;
}

/* Utility Classes */
.strongbody-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .strongbody-layout-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .strongbody-layout-grid[data-columns="4"],
    .strongbody-layout-grid[data-columns="5"] {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .service-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .strongbody-stats {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .strongbody-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .service-image-wrapper {
        height: 150px;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
}