/**
 * ServiceCart Frontend CSS
 * Styles for frontend service product display
 */

/* ==========================================================================
   Hourly Service Price Display
   ========================================================================== */

.hourly-rate-display {
    font-size: 1.2em;
    font-weight: 600;
    color: #2271b1;
}

.hourly-rate-display .amount {
    font-size: 1.3em;
    font-weight: 700;
}

.hourly-rate-display .hourly-suffix {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.hourly-discount-info {
    margin-top: 8px;
}

.hourly-discount-info small {
    color: #0073aa;
    font-style: italic;
}

/* Cart discount notification */
.cart-discount-notification {
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.cart-discount-notification:not(:empty) {
    display: block;
    background: #e7f3ff;
    color: #0073aa;
    border-left: 4px solid #0073aa;
}

/* Milestone payment info */
.milestone-payment-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.milestone-payment-info h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
}

.milestone-payment-info .payment-highlight {
    margin: 8px 0;
    color: #28a745;
    font-size: 15px;
}

.milestone-payment-info .payment-description {
    margin: 8px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Payment schedule breakdown in Service Information tab */
.payment-schedule-breakdown {
    margin: 15px 0;
}

.payment-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.payment-step:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.payment-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #0073aa;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.payment-step-details {
    flex: 1;
}

.payment-step-details strong {
    display: block;
    color: #495057;
    font-size: 14px;
    margin-bottom: 2px;
}

.payment-step-details small {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.3;
}

.payment-schedule-note {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #0073aa;
    border-radius: 0 4px 4px 0;
}

.payment-schedule-note em {
    color: #495057;
    font-size: 13px;
    line-height: 1.4;
}

/* Retainer service price display */
.retainer-rate-display {
    font-size: 1.2em;
    font-weight: 600;
    color: #b45309;
}

.retainer-rate-display .amount {
    font-size: 1.3em;
    font-weight: 700;
}

.retainer-rate-display .retainer-suffix {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

.retainer-included-info {
    margin-top: 8px;
}

.retainer-included-info small {
    color: #0073aa;
    font-style: italic;
}

/* Hourly service quantity information */
.hourly-service-quantity-info {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.hourly-service-quantity-info .quantity-label {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
}

.hourly-discount-notification {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
}

.hourly-discount-notification.discount-available {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.hourly-discount-notification.discount-applied {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ==========================================================================
   Service Information Tab
   ========================================================================== */

.service-information-content {
    padding: 20px 0;
}

.service-information-content .service-main-content {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.service-description-section {
    flex: 2;
    min-width: 0; /* Prevents flex item from overflowing */
}

.service-information-content .service-sidebar {
    flex: 1;
    min-width: 280px;
}

.service-description-section h3 {
    margin: 0 0 20px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
    font-size: 1.4em;
    font-weight: 600;
}

.service-description-content {
    background: #fff;
    padding: 25px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    line-height: 1.7;
    color: #555;
    font-size: 1.05em;
}

.service-information-content .service-sidebar .service-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-information-content .service-sidebar .service-section:last-child {
    margin-bottom: 0;
}

.service-information-content .service-sidebar .service-section h3 {
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
    font-size: 1.2em;
    font-weight: 600;
}

.service-pricing-highlight-sidebar {
    background: #f0f6fc;
    color: #0c4a6e;
    padding: 15px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin: 15px 0;
    text-align: center;
}

.hourly-rate-sidebar {
    font-size: 1.4em;
    font-weight: 700;
    display: block;
}

.service-overview-section,
.service-requirements-section,
.service-terms-section,
.service-payment-section {
    margin-bottom: 30px;
}

.service-overview-section h3,
.service-requirements-section h3,
.service-terms-section h3,
.service-payment-section h3 {
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
    font-size: 1.3em;
    font-weight: 600;
}

/* Service pricing highlight for hourly services */
/* COMPLIANCE FIX: Removed custom branding gradient to follow WooCommerce UX guidelines */
.service-pricing-highlight {
    background: #f0f6fc;
    color: #0c4a6e;
    padding: 20px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin: 15px 0 25px 0;
    text-align: center;
}

.hourly-rate-large {
    font-size: 2em;
    font-weight: 700;
    display: block;
}

/* Service detail items */
.service-detail-item {
    margin: 10px 0;
    padding: 8px 0;
    font-size: 1em;
    line-height: 1.5;
}

.service-detail-item strong {
    color: #333;
    font-weight: 600;
}

/* Package discounts info */
.package-discounts-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.package-discounts-info h4 {
    margin: 0 0 15px 0;
    color: #0073aa;
    font-size: 1.1em;
    font-weight: 600;
}

.discount-tiers {
    list-style: none;
    padding: 0;
    margin: 0;
}

.discount-tier {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.95em;
}

.discount-tier:last-child {
    border-bottom: none;
}

.discount-tier strong {
    color: #333;
    font-weight: 600;
}

/* Requirements and terms content */
.service-requirements-content,
.service-terms-content {
    background: #fafafa;
    border-left: 4px solid #2271b1;
    padding: 15px 20px;
    margin: 10px 0;
    line-height: 1.6;
}

.service-requirements-content p,
.service-terms-content p {
    margin: 0 0 10px 0;
}

.service-requirements-content p:last-child,
.service-terms-content p:last-child {
    margin-bottom: 0;
}

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

@media (max-width: 768px) {
    .hourly-rate-large {
        font-size: 1.6em;
    }
    
    .service-pricing-highlight {
        padding: 15px;
        margin: 15px 0 20px 0;
    }
    
    .service-information-content {
        padding: 15px 0;
    }
    
    .service-information-content .service-main-content {
        flex-direction: column;
        gap: 25px;
    }
    
    .service-information-content .service-sidebar {
        min-width: auto;
    }
    
    .service-overview-section,
    .service-requirements-section,
    .service-terms-section,
    .service-payment-section {
        margin-bottom: 25px;
    }
    
    .package-discounts-info {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hourly-rate-display {
        font-size: 1.1em;
    }
    
    .hourly-rate-display .amount {
        font-size: 1.2em;
    }
    
    .hourly-rate-large {
        font-size: 1.4em;
    }
    
    .service-pricing-highlight {
        padding: 12px;
    }
    
    .service-requirements-content,
    .service-terms-content {
        padding: 12px 15px;
    }
    
    .service-description-content {
        padding: 15px;
    }
    
    .service-information-content .service-sidebar .service-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .service-pricing-highlight-sidebar {
        padding: 12px;
        margin: 12px 0;
    }
    
    .hourly-rate-sidebar {
        font-size: 1.2em;
    }
    
    /* Provider Profile Responsive */
    .provider-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .provider-profile-header .provider-header-left {
        flex-direction: column;
        text-align: center;
    }
    
    .provider-profile-header .provider-header-right {
        align-items: center;
    }
    
    .provider-main-content {
        flex-direction: column;
        gap: 25px;
    }
    
    .provider-sidebar {
        min-width: auto;
    }
    
    .provider-name {
        font-size: 1.8em;
    }
    
    .provider-title {
        font-size: 1.1em;
    }
    
    .provider-section {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .provider-contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Provider Profile Tab
   ========================================================================== */

.provider-profile-content {
    padding: 20px 0;
    max-width: 100%;
}

.provider-main-content {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.provider-about-section {
    flex: 2;
    min-width: 0; /* Prevents flex item from overflowing */
}

.provider-sidebar {
    flex: 1;
    min-width: 280px;
}

.provider-sidebar .provider-section {
    margin-bottom: 25px;
}

.provider-sidebar .provider-section:last-child {
    margin-bottom: 0;
}

/* COMPLIANCE FIX: Removed custom branding gradient to follow WooCommerce UX guidelines */
.provider-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.provider-profile-header .provider-header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.provider-profile-header .provider-header-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.provider-profile-header .provider-header-right .contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.provider-profile-header .provider-header-right .contact-item {
    justify-content: flex-end;
    gap: 8px;
}

.provider-photo {
    flex-shrink: 0;
}

.provider-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.provider-basic-info {
    flex: 1;
}

.provider-name {
    margin: 0 0 8px 0;
    font-size: 2.2em;
    font-weight: 700;
}

.provider-title {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 500;
}

.provider-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.provider-section h3 {
    margin: 0 0 20px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
    font-size: 1.4em;
    font-weight: 600;
}

.provider-summary {
    line-height: 1.7;
    color: #555;
    font-size: 1.05em;
}

.education-list,
.portfolio-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.education-list li,
.portfolio-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
    position: relative;
    padding-left: 40px;
}

.education-list li:before {
    content: "🎓";
    position: absolute;
    left: 0;
    top: 8px;
}

.portfolio-list li:before {
    content: "🔗";
    position: absolute;
    left: 0;
    top: 8px;
}

.education-list li:last-child,
.portfolio-list li:last-child {
    border-bottom: none;
}

.portfolio-list a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.portfolio-list a:hover {
    text-decoration: underline;
}

.provider-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-info,
.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item,
.social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.contact-item .dashicons,
.social-item .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: #2271b1;
}

.contact-item a,
.social-item a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover,
.social-item a:hover {
    color: #2271b1;
    text-decoration: underline;
}

.provider-profile-empty {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   Cart Integration
   ========================================================================== */

.cart .hourly-service-info {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.cart .package-discount-applied {
    color: #0073aa;
    font-weight: 500;
    font-size: 0.85em;
}

/* WooCommerce quantity input styling for hourly services */
.single-product .product-type-service .quantity input.qty {
    min-width: 80px;
}

.single-product .product-type-service .quantity .qty-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Description tab is now removed programmatically for service products */
