/* Service Manager Frontend Styles - Fiverr-Style Cards */

.service-cards-container {
    margin: 20px 0;
    width: 100%;
    background: #ffffff !important;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Search and Filter Controls - Force Single Line */
.service-controls {
    background: #ffffff;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #e4e5e7;
    display: flex !important;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    min-height: 60px;
    box-sizing: border-box;
}

.service-search {
    flex: 2 1 200px;
    min-width: 200px;
    max-width: 400px;
}

.service-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dadbdd;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
    height: 36px;
    box-sizing: border-box;
}

.service-filters {
    display: flex !important;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.service-filter {
    flex-shrink: 0;
}

.service-filter select {
    padding: 8px 10px;
    border: 1px solid #dadbdd;
    border-radius: 4px;
    background: #ffffff;
    font-size: 13px;
    min-width: 120px;
    width: 120px;
    height: 36px;
    box-sizing: border-box;
}

.clear-filters-btn {
    padding: 8px 12px !important;
    background: #f1f2f4 !important;
    border: 1px solid #dadbdd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    height: 36px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.service-cards-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.service-cards-grid.columns-1 {
    grid-template-columns: 1fr;
}

.service-cards-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.service-cards-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.service-cards-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Fiverr-Style Service Card - Exact Match */
.service-card {
    background: #ffffff !important;
    border: 1px solid #e4e5e7;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-card:hover {
    border-color: #1dbf73;
    box-shadow: 0 6px 20px rgba(29, 191, 115, 0.15);
    transform: translateY(-2px);
}

/* Main Image/Video Area */
.service-card-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: #f0f2f5;
}

.service-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.service-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Heart Icon (Like Button) */
.service-card::before {
    content: '♡';
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-card:hover::before {
    background: rgba(0,0,0,0.7);
}

/* Content Area */
.service-card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Profile Section */
.service-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.service-profile-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: #1dbf73;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.service-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-profile-name {
    font-size: 14px;
    color: #62646a;
    font-weight: 400;
}

.service-level-badge {
    background: #ffe0b3;
    color: #b8860b;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}

/* Service Title */
.service-company-name {
    font-size: 16px;
    font-weight: 400;
    color: #404145;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide category in main content */
.service-category {
    display: none;
}

/* Description */
.service-description {
    display: none; /* Hide description to match Fiverr layout */
}

/* Footer with Rating and Price */
.service-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #efeff0;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Rating Section */
.service-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.rating-stars .star {
    font-size: 12px;
    line-height: 1;
}

.rating-stars .star.filled {
    color: #ffb33e;
}

.rating-stars .star.half-filled {
    color: #ffb33e;
    opacity: 0.6;
}

.rating-stars .star.empty {
    color: #d9d9d9;
}

.rating-value {
    font-size: 14px;
    font-weight: 600;
    color: #404145;
    margin-right: 2px;
}

.rating-count {
    font-size: 14px;
    color: #95979d;
    font-weight: 400;
}

/* Price Section */
.service-price {
    text-align: right;
}

.service-price-label {
    font-size: 12px;
    color: #95979d;
    margin-bottom: 2px;
}

.service-price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #404145;
}

/* Contact Info - Hidden in main card, shown on hover/click */
.service-contact {
    display: none;
}

/* Contact Popup */
.service-contact-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e4e5e7;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.service-card:hover .service-contact-popup {
    opacity: 1;
    visibility: visible;
}

.contact-label {
    font-size: 12px;
    color: #62646a;
    margin-bottom: 4px;
    display: block;
}

.service-contact-popup a {
    color: #1dbf73;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.service-contact-popup a:hover {
    text-decoration: underline;
}

.no-services {
    text-align: center;
    color: #62646a;
    font-style: italic;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e4e5e7;
    font-size: 16px;
}

/* Responsive Design - Maintain Single Line */
@media (max-width: 1024px) {
    .service-cards-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-controls {
        flex-wrap: nowrap !important;
    }
    
    .service-filter select {
        min-width: 100px;
        width: 100px;
    }
}

@media (max-width: 768px) {
    .service-cards-container {
        padding: 12px;
    }
    
    .service-controls {
        flex-wrap: nowrap !important;
        gap: 8px;
        padding: 10px 12px;
        overflow-x: auto;
    }
    
    .service-search {
        flex: 1 1 150px;
        min-width: 150px;
    }
    
    .service-filters {
        gap: 6px;
    }
    
    .service-filter select {
        min-width: 80px;
        width: 80px;
        font-size: 12px;
    }
    
    .service-cards-grid.columns-3,
    .service-cards-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-cards-grid {
        gap: 16px;
    }
    
    .service-card-content {
        padding: 12px;
    }
    
    .service-card-footer {
        padding: 10px 12px;
    }
    
    .service-card-image {
        height: 200px;
    }
}

/* Only wrap on very small screens (mobile phones) */
@media (max-width: 480px) {
    .service-cards-grid.columns-2,
    .service-cards-grid.columns-3,
    .service-cards-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .service-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px;
    }
    
    .service-search {
        min-width: auto;
        flex: none;
    }
    
    .service-filters {
        justify-content: space-between;
        width: 100%;
    }
    
    .service-filter {
        flex: 1;
    }
    
    .service-filter select {
        width: 100%;
        min-width: auto;
    }
    
    .service-card-image {
        height: 180px;
    }
    
    .service-company-name {
        font-size: 15px;
    }
    
    .clear-filters-btn {
        width: 100% !important;
        margin-top: 4px;
    }
}

/* Override any theme CSS that might interfere */
.service-controls,
.service-controls * {
    box-sizing: border-box !important;
}

.service-controls .service-filters {
    flex-direction: row !important;
}

.service-controls .service-filter {
    margin: 0 !important;
    padding: 0 !important;
}

/* Card entrance animation */
.service-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delay for multiple cards */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Dark theme override - keep white cards */
@media (prefers-color-scheme: dark) {
    .service-cards-container,
    .service-card,
    .service-controls {
        background: #ffffff !important;
        color: #404145 !important;
    }
}