/**
 * Grade Calculator - Purple Gradient WordPress Styling
 * Matching React App Design
 */

.grade-calculator-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Purple Gradient Hero Section */
.gc-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #3b82f6 100%);
    padding: 30px 30px;
    text-align: center;
    color: white;
    border-radius: 8px 8px 0 0;
}

.gc-hero-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Wrapper */
.gc-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Tabs */
.gc-tabs {
    display: flex;
    gap: 12px;
    padding: 20px 30px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    justify-content: center;
}

.gc-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    border-radius: 6px;
    border: 1px solid transparent;
}

.gc-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.gc-tab.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Content */
.gc-content {
    padding: 30px;
    background: #fff;
}

.gc-panel {
    display: none;
}

.gc-panel.active {
    display: block;
}

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

.gc-input-group {
    display: flex;
    flex-direction: column;
}

.gc-input-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.gc-input-group input[type="number"],
.gc-input-group input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
}

.gc-input-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Courses */
.gc-courses {
    margin-bottom: 30px;
}

.gc-course {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 40px;
    gap: 10px;
    margin-bottom: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.gc-course input {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s;
}

.gc-course input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gc-btn-add {
    padding: 10px 20px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.gc-btn-add:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.gc-btn-remove {
    padding: 0;
    width: 30px;
    height: 30px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.2s;
}

.gc-btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Results */
.gc-result {
    margin: 20px 0;
}

.gc-result-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid;
}

.gc-percentage {
    font-size: 48px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.gc-letter {
    font-size: 32px;
    font-weight: bold;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    min-width: 70px;
    text-align: center;
}

.gc-note {
    font-size: 14px;
    margin: 10px 0 0 0;
    opacity: 0.8;
}

/* Color themes */
.gc-green {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #047857;
}

.gc-teal {
    background: #ccfbf1;
    border-left-color: #14b8a6;
    color: #0f766e;
}

.gc-yellow {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #b45309;
}

.gc-orange {
    background: #fed7aa;
    border-left-color: #f97316;
    color: #c2410c;
}

.gc-red {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* Toggle */
.gc-toggle {
    margin: 20px 0;
}

.gc-toggle label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.gc-toggle input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Placeholder */
.gc-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
}

/* Additional Grade Section */
.gc-additional {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

.gc-additional h4 {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Loading */
.gc-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .gc-hero {
        padding: 40px 20px;
    }
    
    .gc-hero-title {
        font-size: 32px;
    }
    
    .gc-hero-subtitle {
        font-size: 14px;
    }
    
    .gc-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
    }
    
    .gc-tab {
        width: 100%;
        text-align: center;
    }
    
    .gc-content {
        padding: 20px;
    }
    
    .gc-inputs {
        grid-template-columns: 1fr;
    }
    
    .gc-course {
        grid-template-columns: 1fr;
    }
    
    .gc-result-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .gc-percentage {
        font-size: 36px;
    }
    
    .gc-letter {
        font-size: 24px;
    }
}
