/**
 * Landscaping Pricing Calculator Styles
 * Professional green theme for landscaping industry
 */

/* Main Calculator Container */
.lpc-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
}

/* Header Section */
.lpc-header {
    text-align: center;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    border: 2px solid #2d5a27;
    border-radius: 20px;
    padding: 40px 32px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.lpc-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5a27 0%, #4a7c59 50%, #2d5a27 100%);
}

.lpc-header h1 {
    color: #2d5a27;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 4px rgba(45, 90, 39, 0.1);
    letter-spacing: -0.025em;
}

.lpc-header p {
    color: #4a5568;
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Service Grid Layout */
.lpc-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
    padding: 0 8px;
}

@media (max-width: 1400px) {
    .lpc-services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .lpc-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }
}

/* Service Card Styling */
.lpc-service-card {
    background: #ffffff;
    border: 2px solid #e8f5e8;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 480px;
}

.lpc-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #2d5a27;
}

.lpc-service-card.selected {
    border-color: #2d5a27;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
    box-shadow: 0 12px 35px rgba(45, 90, 39, 0.2);
}

/* Service Card Image */
.lpc-service-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    position: relative;
}

.lpc-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lpc-service-card:hover .lpc-service-image img {
    transform: scale(1.05);
}

/* Service Card Content */
.lpc-service-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lpc-service-title {
    color: #2d5a27;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Service Image */
.lpc-service-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpc-service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lpc-service-card:hover .lpc-service-image img {
    transform: scale(1.05);
}

.lpc-service-image .lpc-no-image {
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* Service Content */
.lpc-service-title {
    font-size: 20px;
    font-weight: bold;
    color: #2d5a27;
    margin-bottom: 10px;
    line-height: 1.3;
}

.lpc-service-description {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 72px;
    flex: 1;
}

/* Pricing Options */
.lpc-pricing-options {
    margin-bottom: 24px;
    border-top: 2px solid #f0f8f0;
    padding-top: 20px;
}

.lpc-pricing-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d5a27;
    margin-bottom: 16px;
    padding-bottom: 8px;
    text-align: center;
    position: relative;
}

.lpc-pricing-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #2d5a27, #4a7c59);
}

.lpc-price-option {
    background: linear-gradient(135deg, #f8fff8 0%, #f0f8f0 100%);
    border: 2px solid #e8f5e8;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lpc-price-option:hover {
    border-color: #2d5a27;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.1);
}

.lpc-price-option.selected {
    background: linear-gradient(135deg, #2d5a27 0%, #3d6a37 100%);
    border-color: #2d5a27;
    color: white;
    box-shadow: 0 6px 16px rgba(45, 90, 39, 0.2);
}

.lpc-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.lpc-option-name {
    font-weight: 600;
    font-size: 16px;
    color: inherit;
}

.lpc-option-price {
    font-size: 18px;
    font-weight: 700;
    color: inherit;
}

.lpc-price-option.selected .lpc-option-name,
.lpc-price-option.selected .lpc-option-price {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lpc-option-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.lpc-price-option.selected .lpc-option-description {
    color: #e8f5e8;
}

/* Action Buttons */
.lpc-action-buttons,
.lpc-service-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f8f0;
}

.lpc-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.lpc-add-btn {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lpc-add-btn:disabled,
.lpc-add-btn.disabled {
    background: linear-gradient(135deg, #cccccc 0%, #999999 100%) !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.lpc-add-btn:not(:disabled):not(.disabled) {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    color: white;
    cursor: pointer;
    pointer-events: auto;
    opacity: 1;
}

.lpc-add-btn:not(:disabled):not(.disabled):hover {
    background: linear-gradient(135deg, #1a3a17 0%, #2d5a27 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(45, 90, 39, 0.3);
}

.lpc-remove-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    display: none;
}

.lpc-remove-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.lpc-service-card.in-quote .lpc-add-btn {
    display: none;
}

.lpc-service-card.in-quote .lpc-remove-btn {
    display: inline-block;
}

/* Quote Summary */
.lpc-quote-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fff8 100%);
    border: 3px solid #2d5a27;
    border-radius: 20px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: 0 8px 24px rgba(45, 90, 39, 0.15);
    position: relative;
    overflow: hidden;
}

.lpc-quote-summary:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5a27 0%, #4a7c59 50%, #2d5a27 100%);
}

.lpc-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e8f5e8;
    position: relative;
}

.lpc-quote-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d5a27;
    margin: 0;
    text-shadow: 0 1px 2px rgba(45, 90, 39, 0.1);
}

.lpc-clear-all-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.lpc-clear-all-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.lpc-clear-selection-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.2);
}

.lpc-clear-selection-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

.lpc-quote-items {
    margin-bottom: 20px;
}

.lpc-quote-item {
    background: white;
    border: 1px solid #e8f5e8;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lpc-quote-item-info {
    flex: 1;
}

.lpc-quote-item-name {
    font-weight: bold;
    color: #2d5a27;
    margin-bottom: 4px;
}

.lpc-quote-item-option {
    font-size: 14px;
    color: #718096;
    font-style: italic;
    margin-top: 2px;
}

.lpc-quote-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #2d5a27;
    text-align: right;
}

.lpc-quote-total {
    background: #2d5a27;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.lpc-quote-total-label {
    font-size: 18px;
    margin-bottom: 5px;
}

.lpc-quote-total-amount {
    font-size: 28px;
    font-weight: bold;
}

.lpc-quote-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Lead Form Section */
.lpc-lead-form-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fff8 100%);
    border: 3px solid #2d5a27;
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 12px 32px rgba(45, 90, 39, 0.15);
    display: none;
    position: relative;
    overflow: hidden;
}

.lpc-lead-form-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5a27 0%, #4a7c59 50%, #2d5a27 100%);
}

.lpc-lead-form-section.show {
    display: block;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lpc-lead-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d5a27;
    margin-bottom: 12px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(45, 90, 39, 0.1);
}

.lpc-lead-form-subtitle {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
}

/* Form Styling */
.lpc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.lpc-form-group {
    flex: 1;
}

.lpc-form-group.full-width {
    flex: 100%;
}

.lpc-form-label {
    display: block;
    font-weight: bold;
    color: #2d5a27;
    margin-bottom: 8px;
    font-size: 14px;
}

.lpc-form-required::after {
    content: ' *';
    color: #dc3545;
}

.lpc-form-input,
.lpc-form-select,
.lpc-form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e8f5e8;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.lpc-form-input:focus,
.lpc-form-select:focus,
.lpc-form-textarea:focus {
    outline: none;
    border-color: #2d5a27;
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.lpc-form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.lpc-submit-btn,
.lpc-submit-quote-btn {
    background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lpc-submit-btn:hover,
.lpc-submit-quote-btn:hover {
    background: linear-gradient(135deg, #1a3a17 0%, #2d5a27 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 90, 39, 0.4);
}

.lpc-submit-btn:disabled,
.lpc-submit-quote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(45, 90, 39, 0.1);
}

/* Loading States */
.lpc-loading {
    position: relative;
    overflow: hidden;
}

.lpc-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Messages */
.lpc-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lpc-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.lpc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.lpc-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lpc-calculator {
        padding: 15px;
    }
    
    .lpc-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }
    
    .lpc-service-card {
        min-height: auto;
    }
    
    .lpc-service-content {
        padding: 20px;
    }
    
    .lpc-quote-summary,
    .lpc-lead-form-section {
        padding: 24px;
        margin: 24px 0;
        border-radius: 16px;
    }
    
    .lpc-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .lpc-action-buttons {
        flex-direction: column;
    }
    
    .lpc-quote-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .lpc-quote-item-price {
        text-align: left;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lpc-service-title {
        font-size: 18px;
    }
    
    .lpc-quote-title,
    .lpc-lead-form-title {
        font-size: 20px;
    }
    
    .lpc-quote-total-amount {
        font-size: 24px;
    }
    
    .lpc-service-image {
        height: 150px;
    }
}

/* Modern Visual Enhancements */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #2d5a27;
    outline-offset: 2px;
}

/* Subtle animations */
.lpc-service-grid {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for service cards */
.lpc-service-card:nth-child(1) { animation-delay: 0.1s; }
.lpc-service-card:nth-child(2) { animation-delay: 0.2s; }
.lpc-service-card:nth-child(3) { animation-delay: 0.3s; }
.lpc-service-card:nth-child(4) { animation-delay: 0.4s; }
.lpc-service-card:nth-child(5) { animation-delay: 0.5s; }
.lpc-service-card:nth-child(6) { animation-delay: 0.6s; }

/* Improved hover states */
.lpc-service-card {
    will-change: transform;
}

.lpc-price-option {
    will-change: transform;
}

/* Better button feedback */
button {
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced selection states */
.lpc-price-option.selected .lpc-option-name,
.lpc-price-option.selected .lpc-option-price {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Professional typography */
.lpc-service-card h3,
.lpc-quote-title,
.lpc-lead-form-title {
    letter-spacing: -0.025em;
}

/* Improved spacing and rhythm */
.lpc-calculator-container > * + * {
    margin-top: 2rem;
}

/* Enhanced visual hierarchy with subtle shadows */
.lpc-pricing-title {
    text-shadow: 0 1px 2px rgba(45, 90, 39, 0.1);
}

/* Smooth state transitions */
.lpc-service-card.in-quote {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    border-color: #2d5a27;
}

/* Print Styles */
@media print {
    .lpc-action-buttons,
    .lpc-lead-form-section {
        display: none !important;
    }
    
    .lpc-service-card {
        break-inside: avoid;
    }
}
