/*
 * CSV Import Calculator Styles
 * Modern, clean, responsive design
 */

/* Container and Layout */
.csv-calc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.csv-calc-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.3);
}

.csv-calc-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white !important;
}

.csv-calc-icon {
    font-size: 3rem;
    color: white !important;
}

.csv-calc-subtitle {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    color: white !important;
}

/* Form Container */
.csv-calc-form-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

/* Sections */
.csv-calc-section {
    margin-bottom: 40px;
}

.csv-calc-section:last-child {
    margin-bottom: 0;
}

.csv-calc-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-icon {
    font-size: 1.6rem;
}

/* Form Rows and Fields */
.csv-calc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.csv-calc-field {
    display: flex;
    flex-direction: column;
}

.csv-calc-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.field-description {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
    margin-top: 2px;
}

.csv-calc-field input,
.csv-calc-field select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.csv-calc-field input:focus,
.csv-calc-field select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Example Links */
.field-examples {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.example-link {
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e1e5e9;
    color: #6c757d;
}

.example-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Feature Toggles */
.csv-calc-features {
    display: grid;
    gap: 20px;
}

.feature-toggle {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.feature-toggle:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 0;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 26px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

input[type="checkbox"] {
    display: none;
}

.feature-info {
    flex: 1;
}

.feature-info strong {
    display: block;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 4px;
}

.feature-info span {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
}

.performance-impact {
    color: #e74c3c !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
}

/* Submit Button */
.csv-calc-submit {
    text-align: center;
    margin-top: 40px;
}

.csv-calc-button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white !important;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
}

.csv-calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.5);
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

.csv-calc-button:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
    color: white !important;
}

/* Results Section */
.csv-calc-results {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.results-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 30px 0;
    text-align: center;
}

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

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.time-card {
    border-left: 4px solid #3498db;
}

.memory-card {
    border-left: 4px solid #9b59b6;
}

.risk-card {
    border-left: 4px solid #e74c3c;
}

.cost-card {
    border-left: 4px solid #f39c12;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 1.4rem;
}

.card-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.primary-metric {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.secondary-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.metric-label {
    color: #6c757d;
}

.metric-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Risk Assessment */
.risk-indicator {
    text-align: center;
    margin-bottom: 15px;
}

.risk-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-badge.low {
    background: #d4edda;
    color: #155724;
}

.risk-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.risk-badge.high {
    background: #f8d7da;
    color: #721c24;
}

.server-impact {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.impact-icon {
    font-size: 1.2rem;
}

/* Recommendations */
.recommendations-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e1e5e9;
}

.recommendations-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recommendations-icon {
    font-size: 1.4rem;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Tips Section */
.csv-calc-tips {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.tips-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 30px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tips-icon {
    font-size: 1.6rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #e1e5e9;
}

.tip-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.tip-card ul {
    margin: 0;
    padding-left: 20px;
}

.tip-card li {
    margin-bottom: 8px;
    color: #6c757d;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

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

/* SEO Content */
.csv-calc-seo-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.seo-section h3,
.seo-section h4 {
    color: #2c3e50;
    font-weight: 600;
}

.seo-section h3 {
    font-size: 1.5rem;
    margin: 0 0 20px 0;
}

.seo-section h4 {
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
}

.seo-section p {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 20px;
}

.seo-section ul {
    color: #6c757d;
    padding-left: 20px;
}

.seo-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csv-calc-container {
        padding: 15px;
    }
    
    .csv-calc-header {
        padding: 30px 15px;
    }
    
    .csv-calc-title {
        font-size: 2rem;
    }
    
    .csv-calc-subtitle {
        font-size: 1rem;
    }
    
    .csv-calc-form-container,
    .csv-calc-results,
    .csv-calc-tips,
    .csv-calc-seo-content {
        padding: 25px;
    }
    
    .csv-calc-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .results-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .toggle-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .csv-calc-title {
        flex-direction: column;
        gap: 10px;
    }
    
    .csv-calc-icon {
        font-size: 2.5rem;
    }
    
    .example-link {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* CSV Splitter Section */
.csv-splitter-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.csv-splitter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.csv-splitter-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
}

.csv-splitter-form {
    max-width: 600px;
    margin: 0 auto;
}

.splitter-field {
    margin-bottom: 20px;
}

.splitter-field label {
    font-weight: 600;
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.splitter-field input[type="file"],
.splitter-field select,
#custom-parts {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.splitter-field input[type="file"]:focus,
.splitter-field select:focus,
#custom-parts:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#custom-parts {
    margin-top: 10px;
}

.file-info {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

.splitter-field input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.csv-split-button,
.csv-reset-button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white !important;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.csv-split-button:hover,
.csv-reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.5);
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
}

/* Split Progress */
.split-progress {
    text-align: center;
    padding: 40px 0;
}

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

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

.progress-text {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Split Results */
.split-results {
    text-align: center;
}

.split-results h4 {
    font-size: 1.5rem;
    color: #27ae60;
    margin-bottom: 15px;
}

.split-summary {
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #f8f9ff;
    border-color: #667eea;
    transform: translateX(5px);
}

.download-icon {
    font-size: 1.5rem;
}

.download-info {
    flex: 1;
    text-align: left;
    margin: 0 20px;
}

.download-info strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 4px;
}

.file-rows {
    color: #6c757d;
    font-size: 0.9rem;
}

.download-button {
    background: #2a5298;
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.csv-reset-button {
    background: #6c757d;
    margin-top: 20px;
}

.csv-reset-button:hover {
    background: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
    .csv-splitter-section {
        padding: 25px;
    }
    
    .download-link {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .download-info {
        margin: 0;
        text-align: center;
    }
}