/**
 * JNLED ROI Calculator Styles
 */

/* Modal Styles */
#roi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.roi-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.roi-modal-content {
    position: relative;
    max-width: 1200px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 16px;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.roi-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #3d6b2a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roi-modal-close:hover {
    background: #2d5220;
    transform: rotate(90deg);
}

/* Loading State */
.roi-loading {
    text-align: center;
    padding: 100px 40px;
}

.roi-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3d6b2a;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.roi-error {
    text-align: center;
    padding: 100px 40px;
    color: #dc3545;
}

.roi-error button {
    margin-top: 20px;
    padding: 10px 30px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Calculator Styles */
.jnled-roi-calculator {
    background: linear-gradient(135deg, #f8fdf9 0%, #e8f5e8 100%);
    border-radius: 16px;
    padding: 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-header h3 {
    color: #3d6b2a;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.calculator-header p {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Product Highlight */
.product-highlight {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid #3d6b2a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.product-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info h4 {
    color: #3d6b2a;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.product-price {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.spec-card {
    background: #f8fdf9;
    border: 1px solid #e8f5e8;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease;
}

.spec-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 107, 42, 0.1);
}

.spec-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3d6b2a;
    margin-bottom: 5px;
}

.spec-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input Section */
.input-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.input-section h4 {
    color: #3d6b2a;
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #3d6b2a;
    box-shadow: 0 0 0 3px rgba(61, 107, 42, 0.1);
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.results-section h4 {
    color: #3d6b2a;
    font-size: 1.6rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, #f8fdf9 0%, #e8f5e8 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #d4edda;
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(61, 107, 42, 0.15);
}

.result-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3d6b2a;
    margin-bottom: 5px;
}

.result-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Environmental Section */
.environmental-section {
    background: #e8f4f8;
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    text-align: center;
}

.environmental-section h5 {
    color: #0c5460;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.environmental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.environmental-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #0c5460;
}

.environmental-icon {
    font-size: 2rem;
}

/* Comparison Section */
.comparison-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
}

.comparison-section h5 {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    font-size: 1.3rem;
}

.vs-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.comparison-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
}

.comparison-item h6 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.comparison-item p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.traditional-item {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
}

.jnled-item {
    background: #d4edda;
    border: 2px solid #3d6b2a;
}

.vs-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
}

/* Action Section */
.action-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.roi-print-btn,
.roi-contact-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.roi-print-btn {
    background: #6c757d;
    color: white;
}

.roi-print-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.roi-contact-btn {
    background: linear-gradient(135deg, #3d6b2a 0%, #2d5220 100%);
    color: white;
}

.roi-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 107, 42, 0.3);
}

/* Button Styles */
.jnled-roi-btn {
    background: linear-gradient(135deg, #3d6b2a 0%, #2d5220 100%);
    color: white !important;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.jnled-roi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 107, 42, 0.3);
    color: white !important;
}

.jnled-roi-btn-full {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.jnled-roi-btn-compact {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .roi-modal-content {
        margin: 0;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .jnled-roi-calculator {
        padding: 20px;
    }
    
    .calculator-header h3 {
        font-size: 1.8rem;
    }
    
    .product-info {
        flex-direction: column;
        text-align: center;
    }
    
    .specs-grid,
    .input-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .vs-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vs-text {
        order: -1;
    }
    
    .action-section {
        flex-direction: column;
    }
    
    .roi-modal-close {
        top: 10px;
        right: 10px;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .jnled-roi-calculator,
    .jnled-roi-calculator * {
        visibility: visible;
    }
    
    .jnled-roi-calculator {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white !important;
        padding: 20px;
    }
    
    .roi-modal-close,
    .action-section {
        display: none !important;
    }
}