/* AI Analysis CSS */

/* AI Analysis Options */
.ai-analysis-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ai-option-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ai-option-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.1);
    color: #FF0000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.ai-option-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ai-option-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.ai-option-btn {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.ai-option-btn:hover {
    background-color: #E00000;
}

/* Analysis Parameters */
.analysis-parameters {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 30px;
}

.analysis-parameters h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.parameters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* AI Analysis Results */
.ai-analysis-results {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.results-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.refresh-btn,
.save-btn {
    background-color: #f5f5f5;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.refresh-btn i,
.save-btn i {
    margin-right: 8px;
}

.save-btn {
    background-color: #FF0000;
    color: white;
}

.results-container {
    padding: 20px;
    position: relative;
    min-height: 300px;
}

.results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 300px;
    color: #999;
}

.results-placeholder i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

.results-placeholder p {
    max-width: 500px;
    font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Customer Segmentation Results */
.segment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.segment-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #FF0000;
}

.segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.segment-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.segment-count {
    font-size: 12px;
    font-weight: 500;
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 10px;
}

.segment-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.segment-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
}

.segment-actions {
    display: flex;
    gap: 10px;
}

.view-customers-btn,
.create-promotion-btn {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.view-customers-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.create-promotion-btn {
    background-color: #FF0000;
    color: white;
    border: none;
}

/* AI Recommendations */
.ai-recommendations {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.ai-recommendations h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

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

.recommendations-list li {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.recommendations-list li i {
    font-size: 20px;
    color: #FF0000;
    margin-right: 15px;
    margin-top: 3px;
}

.recommendation-content {
    flex: 1;
}

.recommendation-content h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.recommendation-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.implement-btn {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 15px;
}

.implement-btn.implemented {
    background-color: #4CAF50;
}

/* Smart Promotions Results */
.promotion-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.promotion-preview {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.promotion-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.promotion-header {
    background-color: #FF0000;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.promotion-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.promotion-badge {
    font-size: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
}

.promotion-details {
    padding: 15px;
}

.promotion-description {
    font-size: 14px;
    margin-bottom: 15px;
}

.promotion-terms {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
}

.promotion-terms p {
    margin: 5px 0;
}

.promotion-actions {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
}

.edit-promotion-btn,
.send-promotion-btn {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

.edit-promotion-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.send-promotion-btn {
    background-color: #FF0000;
    color: white;
    border: none;
}

.promotion-customizer {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.promotion-customizer h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Promotion Ideas */
.promotion-ideas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.promotion-idea-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.promotion-idea-card h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.promotion-idea-card p {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
}

.idea-stats {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.use-idea-btn {
    width: 100%;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s;
}

.large-modal {
    max-width: 800px;
}

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

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    font-size: 24px;
    font-weight: 700;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.cancel-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .promotion-builder {
        grid-template-columns: 1fr;
    }
    
    .promotion-preview {
        order: 2;
    }
    
    .promotion-customizer {
        order: 1;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .segment-stats {
        grid-template-columns: 1fr;
    }
    
    .segment-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .recommendations-list li {
        flex-direction: column;
    }
    
    .implement-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .promotion-ideas {
        grid-template-columns: 1fr;
    }
}
