/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    text-align: center;
    padding: 40px 0;
    color: white;
    position: relative;
}

.header-content {
    position: relative;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

.header-content h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

#logout-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

#logout-btn i {
    margin-right: 5px;
}

/* Main content */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    overflow: hidden;
}

.consultation-container {
    padding: 40px;
}

/* Welcome section */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.use-case-selection h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #333;
}

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

.use-case-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.use-case-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.use-case-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.use-case-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #667eea;
    transition: color 0.3s ease;
}

.use-case-card.selected i {
    color: #ffd700;
}

.use-case-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.use-case-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Consultation flow */
.consultation-flow {
    margin-top: 40px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-container {
    margin-bottom: 30px;
}

.question {
    text-align: center;
    margin-bottom: 30px;
}

.question h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.question p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 25px;
}

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

.option-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    cursor: pointer; /* Indicates the entire card is clickable */
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    user-select: none; /* Prevent text selection when clicking */
}

.option-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.option-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.option-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.option-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
}

.option-checkbox input[type="checkbox"],
.option-checkbox input[type="radio"] {
    display: none;
}

.option-checkbox label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.option-card.selected .option-checkbox label {
    background: #ffd700;
    border-color: #ffd700;
}

.option-checkbox label:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #333;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card.selected .option-checkbox label:after {
    opacity: 1;
    border-color: #333;
}

.option-content {
    flex: 1;
}

.option-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    margin-top: 0;
}

.option-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.question-instruction {
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
    text-align: center;
}

/* Navigation buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.navigation-buttons #prev-btn {
    order: 1;
}

.navigation-buttons #next-btn {
    order: 2;
}

/* When previous button is hidden, keep next button on the right */
.navigation-buttons #next-btn {
    margin-left: auto;
}

/* For mobile, when previous button is hidden, adjust layout */
@media (max-width: 768px) {
    .navigation-buttons #next-btn {
        margin-left: 0;
    }
    
    /* When previous button is hidden, keep next button on top */
    .navigation-buttons.no-prev-btn {
        justify-content: flex-start;
    }
    
    .navigation-buttons.no-prev-btn #next-btn {
        order: 1;
    }
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Results section */
.results-container {
    text-align: center;
}

.results-header {
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 10px;
}

.results-header h2 i {
    color: #28a745;
    margin-right: 10px;
}

.results-header p {
    font-size: 1.1rem;
    color: #666;
}

.recommendation-content {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.recommendation-section {
    margin-bottom: 25px;
}

.recommendation-section h3 {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.recommendation-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

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

.spec-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.spec-item strong {
    color: #333;
}

.products-section {
    margin-top: 30px;
}

.product-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-image {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #667eea;
}

.product-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.product-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.product-price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: white;
    opacity: 0.8;
}

/* Message notifications */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.info {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .consultation-container {
        padding: 20px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
    
    .use-case-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .navigation-buttons #prev-btn {
        order: 2;
    }
    
    .navigation-buttons #next-btn {
        order: 1;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .product-card {
        flex-direction: column;
        text-align: center;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .consultation-container {
        padding: 15px;
    }
    
    .use-case-card {
        padding: 20px;
    }
    
    .option-card {
        padding: 15px;
    }
} 

/* Responsive design for messages */
@media (max-width: 768px) {
    .message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    #logout-btn {
        position: static;
        margin-top: 15px;
        display: inline-block !important;
    }
}

/* Loading dots animation for searching message */
@keyframes dot1 {
    0%, 20% { opacity: 0; }
    40% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes dot2 {
    0%, 40% { opacity: 0; }
    60% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes dot3 {
    0%, 60% { opacity: 0; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.loading-dots span {
    font-size: 24px;
    color: #007bff;
    margin: 0 2px;
}

/* Q&A Section Styles */
.qa-list {
    margin-top: 15px;
}

.qa-item {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
}

.qa-item:last-child {
    margin-bottom: 0;
}

.question-text {
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.answer-text {
    color: #666;
    padding-left: 20px;
    border-left: 2px solid #e9ecef;
    margin-left: 10px;
}

.qa-item:hover {
    background: #e9ecef;
    transition: background-color 0.2s ease;
}

/* Specification dropdowns */
.spec-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
    margin-top: 5px;
}

.spec-dropdown:hover {
    border-color: #007bff;
}

.spec-dropdown:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.spec-item {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.spec-item strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

/* Update recommendations button */
#update-recommendations {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

#update-recommendations:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

#update-recommendations:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#update-recommendations i {
    margin-right: 8px;
} 