/**
 * W Service Module Styles
 * CSS styles for service management functionality
 */

/* ==========================================================================
   Service List & Grid Styles
   ========================================================================== */

.w-service-list {
    margin: 20px 0;
}

.w-service-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    transition: all 0.3s ease;
}

.w-service-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.w-service-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.w-service-title a {
    color: #333;
    text-decoration: none;
}

.w-service-title a:hover {
    color: #007cba;
}

.w-service-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.w-service-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.w-service-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007cba;
}

.w-service-duration {
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.w-service-categories {
    margin-bottom: 15px;
}

.w-service-category-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 4px;
}

.w-service-actions {
    margin-top: 15px;
}

.w-service-book-btn {
    background: #007cba;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.w-service-book-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Service Grid Styles */
.w-service-grid {
    margin: 20px 0;
}

.w-service-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.w-service-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.w-service-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.w-service-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2rem;
}

.w-service-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.w-service-card .w-service-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.w-service-card .w-service-meta {
    margin-bottom: auto;
}

.w-service-card .w-service-price {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.w-service-card .w-service-actions {
    margin-top: 15px;
}

/* ==========================================================================
   Single Service Styles
   ========================================================================== */

.w-service-single {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.w-service-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.w-service-single .w-service-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.w-service-content {
    line-height: 1.7;
}

.w-service-details {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.w-service-price-info,
.w-service-duration-info,
.w-service-staff-info {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.w-service-details label {
    font-weight: 600;
    color: #333;
    min-width: 100px;
}

.w-service-staff-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.w-staff-item {
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* ==========================================================================
   Service Categories Styles
   ========================================================================== */

.w-service-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.w-service-category-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.w-service-category-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.w-category-icon {
    font-size: 2.5rem;
    color: #007cba;
    margin-bottom: 15px;
}

.w-category-name {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.w-category-name a {
    color: #333;
    text-decoration: none;
}

.w-category-name a:hover {
    color: #007cba;
}

.w-category-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.w-category-count {
    color: #999;
    font-size: 0.85rem;
}

/* ==========================================================================
   Search Form Styles
   ========================================================================== */

.w-service-search-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.w-search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.w-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.w-search-btn {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.w-search-btn:hover {
    background: #005a87;
}

.w-search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.w-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.w-filter-group .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.w-price-range,
.w-duration-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.w-price-range input,
.w-duration-range input {
    flex: 1;
}

.w-price-range span,
.w-duration-range span {
    color: #666;
}

/* ==========================================================================
   Popular Services Styles
   ========================================================================== */

.w-popular-services {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.w-popular-title {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.w-popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.w-popular-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.w-popular-item:hover {
    background: #f0f0f0;
}

.w-popular-rank {
    background: #007cba;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.w-popular-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.w-popular-item .w-service-title {
    margin: 0;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
}

.w-service-stats {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.w-booking-count,
.w-revenue {
    display: flex;
    align-items: center;
    gap: 5px;
}

.w-booking-count:before {
    content: "📊";
}

.w-revenue:before {
    content: "💰";
}

/* ==========================================================================
   Additional Services Styles
   ========================================================================== */

.service-card__additional-services {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007cba;
}

.service-card__additional-title {
    display: block;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.service-card__additional-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-card__additional-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.service-card__additional-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0,124,186,0.1);
}

.additional-service-name {
    font-size: 0.9rem;
    color: #333;
    flex: 1;
}

.additional-service-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #007cba;
    margin-left: 10px;
}

.service-item__additional-services {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007cba;
}

.service-item__additional-title {
    display: block;
    color: #333;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.service-item__additional-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item__additional-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.service-item__additional-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0,124,186,0.1);
}

.service-item__additional-item .additional-service-name {
    font-size: 0.95rem;
}

.service-item__additional-item .additional-service-price {
    font-size: 0.95rem;
}

/* ==========================================================================
   Status & Utility Styles
   ========================================================================== */

.w-service-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.w-service-status-active {
    background: #d4edda;
    color: #155724;
}

.w-service-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.w-service-status-draft {
    background: #fff3cd;
    color: #856404;
}

.w-service-no-results {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 6px;
    margin: 20px 0;
}

.w-service-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

.w-service-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.w-service-loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: w-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes w-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@media (max-width: 768px) {
    .w-service-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .w-search-input-group {
        flex-direction: column;
    }
    
    .w-search-filters {
        grid-template-columns: 1fr;
    }
    
    .w-service-categories {
        grid-template-columns: 1fr;
    }
    
    .w-popular-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .w-service-details {
        padding: 15px;
    }
    
    .w-service-price-info,
    .w-service-duration-info,
    .w-service-staff-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .w-service-details label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .w-service-single {
        padding: 20px;
    }
    
    .w-service-search-form {
        padding: 20px;
    }
    
    .w-popular-services {
        padding: 20px;
    }
    
    .w-service-single .w-service-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .w-service-book-btn,
    .w-search-btn,
    .w-service-actions {
        display: none !important;
    }
    
    .w-service-card,
    .w-service-item,
    .w-service-single {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}