/* === ИЗОЛИРОВАННЫЕ СТИЛИ КАЛЬКУЛЯТОРА ДЕЙСТВИЙ С КОРНЯМИ === */
.wp-roots-actions-wrapper, .wp-roots-actions-wrapper * { 
    box-sizing: border-box !important; 
    line-height: normal !important;
}
.wp-roots-actions-wrapper {
    width: 100% !important; display: flex !important; justify-content: center !important; margin: 20px 0 !important;
}
.wp-roots-actions-wrapper p { margin: 0 !important; padding: 0 !important; display: inline !important; line-height: normal !important; }
.wp-roots-actions-wrapper br { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; }

.wp-roots-actions-wrapper .calculator-card {
    width: 100% !important; max-width: 650px !important; background: #ffffff !important; padding: 25px; 
    border-radius: 12px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important; border: 1px solid #e2e8f0 !important;
}
.wp-roots-actions-wrapper h2 { font-size: 20px !important; margin: 0 0 25px 0 !important; text-align: center !important; color: #333333 !important; }

/* Табличная сетка рабочей строки ввода */
.wp-roots-actions-wrapper .calc-table-layout,
.wp-roots-actions-wrapper .calc-table-layout tr,
.wp-roots-actions-wrapper .calc-table-layout td {
    border: none !important; border-bottom: none !important; border-top: none !important; border-left: none !important; border-right: none !important; box-shadow: none !important;
}
.wp-roots-actions-wrapper .calc-table-layout { width: auto !important; margin: 0 auto !important; border-collapse: collapse !important; }
.wp-roots-actions-wrapper .calc-table-layout td { padding: 0 4px !important; vertical-align: middle !important; background: none !important; height: 70px !important; }

/* Элемент корня (Коэффициент + Знак радикала) */
.wp-roots-actions-wrapper .root-input-group {
    display: inline-flex !important; align-items: center !important; gap: 2px !important;
}
.wp-roots-actions-wrapper .coeff-input {
    width: 45px !important; height: 38px !important; font-size: 16px !important; text-align: center !important;
    border: 1px solid #ccc !important; border-radius: 4px !important; background: #ffffff !important; padding: 0 !important;
}
.wp-roots-actions-wrapper .input-root-symbol { font-size: 32px !important; font-weight: 300 !important; color: #333333 !important; font-family: monospace !important; margin-right: -2px; }
.wp-roots-actions-wrapper .input-root-line { border-top: 2px solid #333333 !important; padding-top: 3px !important; display: inline-block !important; }
.wp-roots-actions-wrapper .inside-input {
    width: 55px !important; height: 34px !important; font-size: 16px !important; text-align: center !important;
    border: 1px solid #ccc !important; border-radius: 4px !important; background: #ffffff !important; padding: 0 !important;
}

/* Действие и Кнопка */
.wp-roots-actions-wrapper select {
    width: 50px !important; height: 42px !important; font-size: 18px !important; font-weight: bold !important; text-align: center !important; 
    border: 1px solid #ccc !important; border-radius: 6px !important; background: #ffffff !important; padding: 0 !important;
}
.wp-roots-actions-wrapper button {
    background-color: #007bff !important; color: #ffffff !important; border: none !important; border-radius: 6px !important;
    font-size: 16px !important; font-weight: bold !important; height: 42px !important; padding: 0 15px !important; cursor: pointer !important;
}
.wp-roots-actions-wrapper button:hover { background-color: #0056b3 !important; }

/* Знак корня в результатах (алгебраический вид) */
.wp-roots-actions-wrapper .root-view { display: inline-flex !important; align-items: center !important; font-family: 'Courier New', Courier, monospace !important; font-size: 22px !important; font-weight: bold !important; }
.wp-roots-actions-wrapper .root-symbol { font-size: 26px !important; font-weight: 300 !important; margin-right: -2px; }
.wp-roots-actions-wrapper .root-content { border-top: 2px solid #111111 !important; padding: 2px 4px 0 4px !important; width: 100% !important; text-align: center !important; }
.wp-roots-actions-wrapper .out-multiplier { font-size: 22px !important; font-weight: bold !important; margin-right: 1px !important; font-family: 'Courier New', Courier, monospace !important; }

/* Блок результатов */
.wp-roots-actions-wrapper .output-container { width: 100% !important; background-color: #fafafa !important; border: 1px solid #ccc !important; border-radius: 6px !important; padding: 15px !important; margin-top: 20px !important; overflow-x: auto !important; clear: both !important; }
.wp-roots-actions-wrapper .step-text-title { font-size: 16px !important; font-weight: bold !important; color: #555555 !important; margin-top: 15px !important; margin-bottom: 8px !important; }
.wp-roots-actions-wrapper .fraction-step-row { display: flex !important; align-items: center !important; gap: 8px !important; margin-bottom: 12px !important; flex-wrap: wrap !important; }
.wp-roots-actions-wrapper .math-text-line { font-family: 'Courier New', Courier, monospace !important; font-size: 22px !important; font-weight: bold !important; color: #111111 !important; margin-bottom: 8px !important; }

@media (max-width: 480px) {
    .wp-roots-actions-wrapper .calculator-card { padding: 10px 2px !important; border-radius: 8px !important; }
    .wp-roots-actions-wrapper .calc-table-layout td { padding: 0 1px !important; }
    .wp-roots-actions-wrapper .coeff-input { width: 35px !important; }
    .wp-roots-actions-wrapper .inside-input { width: 45px !important; }
}
