/* ==========================================================================
   SkladMed Medical Calculator & Analogue Showcase Styles (Plugin medcalc)
   Strictly 0 mentions of VAT.
   ========================================================================== */

.sm-medcalc-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    padding: 24px 28px;
    margin: 24px 0;
    font-family: inherit;
    color: #1e293b;
    position: relative;
    box-sizing: border-box;
}

.sm-medcalc-header {
    margin-bottom: 20px;
}

.sm-medcalc-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfeff;
    color: #0e7490;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #cffafe;
    margin-bottom: 10px;
}

.sm-medcalc-badge.analogue-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

.sm-medcalc-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.sm-medcalc-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Processing Method Switcher */
.sm-chemcalc-proc-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.sm-proc-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 0.02em;
}

.sm-proc-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sm-proc-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sm-proc-btn:hover {
    border-color: #0e7490;
    color: #0e7490;
}

.sm-proc-btn.active {
    background: #0e7490;
    border-color: #0e7490;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(14, 116, 144, 0.25);
}

/* Tabs switcher */
.sm-chemcalc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.sm-chemcalc-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-chemcalc-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sm-chemcalc-tab.active {
    background: #0e7490;
    color: #ffffff;
    border-color: #0e7490;
}

/* Inputs row */
.sm-chemcalc-inputs-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.sm-chemcalc-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sm-chemcalc-col {
    flex: 1;
    min-width: 200px;
}

.sm-chemcalc-col.full-width {
    flex: 100%;
}

.sm-chemcalc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sm-chemcalc-select, .sm-chemcalc-num {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.sm-chemcalc-select:focus, .sm-chemcalc-num:focus {
    border-color: #0e7490;
    box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.15);
}

.sm-chemcalc-qty-control {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.sm-chemcalc-qty-control .sm-chemcalc-num {
    border: none;
    text-align: center;
    font-weight: 700;
}

.sm-qty-btn {
    background: #f1f5f9;
    border: none;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.sm-qty-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.sm-tank-presets {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sm-tank-preset {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.sm-tank-preset:hover {
    border-color: #0e7490;
    color: #0e7490;
}

.sm-tank-preset.active {
    background: #0e7490;
    color: #ffffff;
    border-color: #0e7490;
}

/* Results Metrics Grid */
.sm-chemcalc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.sm-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.sm-metric-card.highlight {
    background: #f0fdf4;
    border-color: #86efac;
}

.sm-metric-lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.sm-metric-val {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.sm-metric-val.text-blue { color: #0284c7; }
.sm-metric-val.text-teal { color: #0e7490; }
.sm-metric-val.text-green { color: #16a34a; }

.sm-metric-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

/* Paired Kit Box */
.sm-chemcalc-kit-box {
    background: #ffffff;
    border: 2px solid #0e7490;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 4px 12px rgba(14, 116, 144, 0.08);
}

.sm-kit-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #0e7490;
    margin-bottom: 14px;
}

.sm-kit-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.sm-kit-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    gap: 12px;
}

.sm-kit-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.sm-kit-item-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.sm-kit-item-tag.dev { background: #e0f2fe; color: #0369a1; }
.sm-kit-item-tag.fix { background: #ccfbf1; color: #0f766e; }

.sm-kit-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.sm-kit-item-meta {
    text-align: right;
    white-space: nowrap;
}

.sm-kit-item-qty {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.sm-kit-item-price {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-left: 8px;
}

.sm-kit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    gap: 20px;
    flex-wrap: wrap;
}

.sm-kit-total-info {
    display: flex;
    flex-direction: column;
}

.sm-kit-total-lbl {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}

.sm-kit-total-val {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.sm-kit-total-note {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
    margin-top: 2px;
}

.sm-btn-add-kit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #16a34a;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
    transition: all 0.2s;
    text-decoration: none;
}

.sm-btn-add-kit:hover {
    background: #15803d;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
    transform: translateY(-1px);
}

.sm-btn-add-kit:active {
    transform: translateY(0);
}

.sm-kit-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sm-kit-feedback.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

/* ==========================================================================
   Clean Analogue Showcase Cards Grid (medcalc)
   Strictly 0 mentions of VAT.
   ========================================================================== */

.sm-analogues-showcase {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    padding: 24px 28px;
    margin: 24px 0;
    box-sizing: border-box;
}

.sm-analogues-header {
    margin-bottom: 20px;
}

.sm-analogues-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #dbeafe;
    margin-bottom: 10px;
}

.sm-analogues-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.sm-analogues-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Cards Grid */
.sm-analogues-cards-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.sm-analogues-cards-grid.items-1 {
    grid-template-columns: 1fr;
    max-width: 580px;
}

.sm-analogues-cards-grid.items-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sm-analogues-cards-grid.items-3,
.sm-analogues-cards-grid.items-4 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 960px) {
    .sm-analogues-cards-grid.items-3,
    .sm-analogues-cards-grid.items-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .sm-analogues-cards-grid.items-1,
    .sm-analogues-cards-grid.items-2,
    .sm-analogues-cards-grid.items-3,
    .sm-analogues-cards-grid.items-4 {
        grid-template-columns: 1fr;
    }
    .sm-analogues-showcase {
        padding: 18px 16px;
    }
}

/* Single Card */
.sm-analogue-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.sm-analogue-card:hover {
    border-color: #0e7490;
    box-shadow: 0 6px 16px rgba(14, 116, 144, 0.1);
    transform: translateY(-2px);
}

.sm-analogue-card-body {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.sm-analogue-thumb-wrap {
    flex: 0 0 85px;
    height: 85px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
}

.sm-analogue-thumb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}

.sm-analogue-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
}

.sm-analogue-info {
    flex: 1;
    min-width: 0;
}

.sm-analogue-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.sm-meta-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.3;
}

.sm-meta-tag.brand {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.sm-meta-tag.format {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.sm-meta-tag.stock {
    background: #dcfce7;
    color: #15803d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sm-analogue-name {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

.sm-analogue-name a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.15s;
}

.sm-analogue-name a:hover {
    color: #0e7490;
    text-decoration: underline;
}

.sm-analogue-ru {
    font-size: 11.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    line-height: 1.3;
}

/* Card Footer */
.sm-analogue-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.sm-analogue-price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.sm-price-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: #64748b;
}

.sm-price-val {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.sm-analogue-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sm-btn-analogue-view {
    padding: 7px 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sm-btn-analogue-view:hover {
    border-color: #0e7490;
    color: #0e7490;
    background: #f8fafc;
}

.sm-btn-analogue-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #16a34a;
    border: 1.5px solid #16a34a;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sm-btn-analogue-cart:hover {
    background: #15803d;
    border-color: #15803d;
}

.sm-btn-analogue-cart.added {
    background: #0e7490;
    border-color: #0e7490;
}

.sm-analogue-feedback {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
