/* Components CSS for Everything But The Food website */

/* Sticky Navigation */
header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: #f8f8f8;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
}

.breadcrumbs li:not(:last-child)::after {
    content: '>';
    margin: 0 10px;
    color: #999;
}

.breadcrumbs a {
    color: #333;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #ff6b00;
}

/* Product Filters */
.product-filters {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.product-filters h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.filter-group {
    margin-bottom: 15px;
}

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

.price-slider {
    display: flex;
    align-items: center;
}

.price-slider input[type="range"] {
    flex: 1;
    margin-right: 10px;
}

.checkbox-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.checkbox-filters label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-filters input {
    margin-right: 5px;
}

.compare-btn {
    margin-left: auto;
}

/* ROI Calculator Enhancements */
.roi-calculator {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 5px;
    margin: 30px 0;
}

.roi-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.roi-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.roi-tab.active {
    border-bottom-color: #ff6b00;
    color: #ff6b00;
}

.roi-tab-content {
    display: none;
}

.roi-tab-content.active {
    display: block;
}

.range-slider {
    margin-top: 10px;
}

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

.roi-results {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.savings-result {
    font-size: 18px;
    margin-bottom: 20px;
}

.savings-result span {
    font-weight: 700;
    color: #28a745;
}

.savings-breakdown {
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.savings-breakdown h4 {
    margin-top: 0;
}

.savings-breakdown ul {
    padding-left: 20px;
}

.savings-breakdown li {
    margin-bottom: 10px;
}

.savings-breakdown span {
    font-weight: 600;
    color: #28a745;
}

/* Demo CTA Section */
.demo-cta {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
}

.demo-cta h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.demo-cta p {
    margin-bottom: 25px;
    color: #666;
}

.primary-btn {
    background-color: #ff6b00;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:hover {
    background-color: #e05f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-btn i {
    margin-right: 8px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 5px;
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #333;
}

/* Demo Form Styling */
.demo-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.demo-form .form-group:nth-child(5),
.demo-form .form-group:nth-child(6),
.demo-form .form-group:nth-child(7) {
    grid-column: span 2;
}

.demo-form button {
    grid-column: span 2;
    margin-top: 10px;
}

.demo-confirmation {
    display: none;
    text-align: center;
    padding: 30px 0;
}

.demo-confirmation i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.demo-confirmation h3 {
    margin-bottom: 10px;
    color: #333;
}

.demo-confirmation p {
    color: #666;
}

.comparison-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background-color: #f8f8f8;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background-color: #f5f5f5;
}

/* FAQ Accordion */
.faq-container {
    margin: 30px 0;
}

.faq-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background-color: #f8f8f8;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 20px;
    color: #999;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 15px 20px;
    max-height: 500px;
}

/* Testimonial Carousel */
.testimonial-container {
    position: relative;
    padding: 30px 0;
}

.testimonial {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.testimonial:first-child {
    display: block;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 600;
}

.testimonial-company {
    color: #666;
    font-size: 14px;
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.prev-testimonial,
.next-testimonial {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    color: #666;
    transition: color 0.3s ease;
}

.prev-testimonial:hover,
.next-testimonial:hover {
    color: #ff6b00;
}

.testimonial-dots {
    display: flex;
    margin: 0 15px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.testimonial-dot.active {
    background-color: #ff6b00;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1002;
}

.toast {
    display: flex;
    align-items: center;
    background-color: #fff;
    color: #333;
    padding: 12px 20px;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 350px;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-hiding {
    transform: translateX(100%);
    opacity: 0;
}

.toast i {
    margin-right: 10px;
    font-size: 18px;
}

.toast-success i {
    color: #28a745;
}

.toast-error i {
    color: #dc3545;
}

.toast-warning i {
    color: #ffc107;
}

.toast-info i {
    color: #17a2b8;
}

.close-toast {
    margin-left: auto;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0 0 0 10px;
    font-size: 14px;
}

.close-toast:hover {
    color: #333;
}

/* Newsletter Signup */
.newsletter-signup {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 5px;
    margin: 30px 0;
    text-align: center;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto 0;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 10px 20px;
    background-color: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #e65c00;
}

/* Live Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ff6b00;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.chat-button:hover {
    background-color: #e65c00;
}

.chat-button i {
    font-size: 24px;
}

.chat-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    transition: all 0.3s ease;
    transform-origin: bottom right;
}

.chat-container.active {
    display: block;
    animation: chatOpen 0.3s forwards;
}

@keyframes chatOpen {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-header {
    background-color: #ff6b00;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-chat {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

.chat-messages {
    height: 300px;
    padding: 15px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 20px;
    background-color: #f1f1f1;
}

.chat-message.user .message-content {
    background-color: #ff6b00;
    color: #fff;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.chat-input button {
    background-color: #ff6b00;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input button:hover {
    background-color: #e65c00;
}

/* Form validation styles */
input.error,
select.error,
textarea.error {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-columns {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 5px;
    }
    
    .chat-container {
        width: 300px;
        right: -10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        width: 280px;
    }
    
    .testimonial {
        padding: 20px;
    }
    
    .roi-calculator {
        padding: 20px;
    }
    
    .product-filters {
        padding: 15px;
    }
    
    .checkbox-filters {
        grid-template-columns: 1fr;
    }
}
