/* calc/assets/css/calculators/grade_average.css */

:root {
    --accent-teal: #0F766E; /* Teal 700 */
    --accent-teal-light: #F0FDFA; /* Teal 50 */
    --gradient-teal-card: linear-gradient(135deg, #14B8A6 0%, #0F766E 100%);
    --text-on-teal: #ffffff;
}

.calc-header { margin-bottom: 24px; }
.subtitle { color: var(--text-secondary); margin-top: 8px; font-size: 16px; }

/* Grid */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1.2fr 0.8fr; } }

/* Inputs */
.input-block-title {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-secondary); margin-bottom: 12px; font-weight: 700;
}

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.input-wrapper { position: relative; display: flex; align-items: center; }

.input-wrapper input {
    width: 100%; padding: 12px 14px; padding-right: 14px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 10px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
    background: #fff;
}
.input-wrapper input:focus { 
    border-color: var(--accent-teal); 
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1); 
}
.helper-text { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Custom Select (v3.3) */
.select-wrapper { position: relative; background: #fff; }
.select-wrapper select {
    width: 100%; padding: 12px 14px; padding-right: 40px;
    font-size: 16px; font-weight: 500;
    border: 1px solid #E5E7EB; border-radius: 10px;
    outline: none; transition: all 0.2s;
    font-family: var(--font-main);
    background: transparent;
    -webkit-appearance: none; appearance: none;
    cursor: pointer; color: var(--text-primary);
}
.select-wrapper select:focus { border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1); }
.select-arrow {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: var(--text-secondary); display: flex;
}
.select-wrapper:hover .select-arrow { color: var(--accent-teal); }

/* Quick Buttons Grid */
.quick-buttons-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px;
}
.q-btn {
    background: #F0FDFA; border: 1px solid #CCFBF1; color: #0F766E;
    border-radius: 8px; padding: 12px 0; font-size: 18px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}
.q-btn:hover { background: #CCFBF1; transform: translateY(-2px); }
.q-btn:active { transform: translateY(0); }

/* Action Buttons */
.action-buttons { display: flex; gap: 12px; }
.btn-text-action {
    background: transparent; border: none; padding: 0;
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: color 0.2s;
}
.btn-text-action:hover { color: var(--text-primary); }
.text-danger:hover { color: #EF4444; }

/* Result Card */
.card--teal { background: var(--gradient-teal-card); color: var(--text-on-teal); border: none; }
.card--teal h2 { color: rgba(255,255,255,0.8); font-size: 14px; text-transform: uppercase; margin-bottom: 8px; letter-spacing: 0.05em; }

/* Grade Circle (ИСПРАВЛЕНО) */
.grade-circle-wrapper { display: flex; justify-content: center; margin: 20px 0; }
.grade-circle {
    width: 120px; height: 120px; /* Было 100px */
    border-radius: 50%;
    background: rgba(255,255,255,0.2); border: 4px solid rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; /* Было 42px */
    font-weight: 800; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    line-height: 1; /* Чтобы цифры стояли ровно по центру */
}

.text-center { text-align: center; }
.result-sub { font-size: 16px; opacity: 0.95; font-weight: 500; }

.summary-divider { height: 1px; background: rgba(255,255,255,0.2); margin: 24px 0; }

/* Target Box */
.target-box { 
    background: rgba(0,0,0,0.15); padding: 16px; border-radius: 12px; margin-bottom: 20px;
}
.target-box h4 { margin: 0 0 10px 0; font-size: 14px; opacity: 0.9; font-weight: 600; }
.target-result { display: flex; align-items: center; gap: 12px; }
.target-icon { 
    width: 40px; height: 40px; background: #fff; color: var(--accent-teal); 
    border-radius: 10px; display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0;
}
.target-info { display: flex; flex-direction: column; }
.t-val { font-size: 20px; font-weight: 800; line-height: 1.2; }
.t-text { font-size: 13px; opacity: 0.9; }

/* Stats */
.stats-row { display: flex; justify-content: space-between; font-size: 13px; opacity: 0.8; }

/* Content */
.info-wrapper { padding: 40px 0; margin-top: 40px; border-top: 1px solid rgba(0,0,0,0.06); margin-bottom: 20px; }
.info-wrapper .container { max-width: 800px; margin: 0 auto; }
.icon-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.header-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.04); flex-shrink: 0; margin-top: -2px; }
.header-icon svg { width: 20px; height: 20px; stroke-width: 2px; }

.teal-icon svg { color: var(--accent-teal); }
.blue-icon svg { color: #2563EB; }

.formulas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 40px; }
.formula-card { background: #fff; border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; }
.formula-header { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.formula-card h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.formula-card p { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; font-weight: 500; }
.badge-teal { background: #F0FDFA; color: #0F766E; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.badge-dark { background: #1F2937; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: inline-block; }
.math-expression { background: #F0FDFA; border: 1px solid #CCFBF1; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: #0F766E; text-align: center; margin-bottom: 12px; font-size: 14px; }

.soft-divider { border: none; height: 1px; background: linear-gradient(90deg, transparent, #E5E7EB, transparent); margin: 40px 0; }
.calc-description p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 20px; }
.calc-description strong { color: var(--text-primary); }

/* FAQ */
.faq-teal-style .faq-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: all 0.2s ease; }
.faq-teal-style .faq-item[open] { border-color: var(--accent-teal); box-shadow: 0 4px 16px rgba(15, 118, 110, 0.1); }
.faq-teal-style summary.faq-question { padding: 14px 18px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-teal-style summary.faq-question:hover { background-color: #F9FAFB; }
.faq-teal-style .faq-item[open] summary.faq-question { color: #0F766E; background: #F0FDFA; }
.faq-question::after { content: '+'; font-size: 18px; color: var(--text-secondary); }
.faq-teal-style .faq-item[open] summary.faq-question::after { content: '−'; color: #0F766E; }
.faq-answer { padding: 18px; color: var(--text-secondary); line-height: 1.6; font-size: 14px; }

@media (max-width: 900px) {
    .formulas-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
    .icon-heading { font-size: 20px; gap: 12px; margin-bottom: 20px; flex-direction: column; align-items: center; text-align: center; }
    .header-icon { width: 40px; height: 40px; margin-top: 0; }
    .header-icon svg { width: 20px; height: 20px; }
    .formula-card { padding: 24px; text-align: center; align-items: center; }
    .formula-header { align-items: center; width: 100%; }
    .math-expression { width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
    .info-wrapper { margin-top: 30px; padding-top: 30px; }
}