.rcalculator,
.rcalculator * {
    box-sizing: border-box;
}

.rcalculator {
    --rc-color: #fa8400;
    --rc-color-dark: #d66f00;
    --rc-accent: #237803;
    --rc-accent-soft: #d7eec2;
    --rc-bg: #ffffff;
    font: 14px Arial, sans-serif;
    width: 100%;
    padding: 18px 0;
}

.rcalculator .rc-layout {
    display: block;
    width: 100%;
}

.rcalculator .rc-layout.rc-layout-has-image {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(280px, 1fr);
    gap: 28px;
    align-items: stretch;
}

.rcalculator .rc-card-wrap,
.rcalculator .rc-visual-wrap {
    min-width: 0;
}

.rcalculator .rc-card {
    width: 100%;
    background: var(--rc-bg);
    border: 1px solid #ececec;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.rcalculator .rc-header {
    background: linear-gradient(135deg, var(--rc-color) 0%, var(--rc-color-dark) 100%);
    color: #fff;
    padding: 24px 24px 18px;
    text-align: center;
}

.rcalculator .rc-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 4px;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
}

.rcalculator .rc-header p {
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: 12px;
}

.rcalculator .rc-progress {
    height: 5px;
    background: #eef0ec;
}

.rcalculator .rc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rc-accent) 0%, #49a326 100%);
    transition: width .3s;
}

.rcalculator .rc-step {
    display: none;
    padding: 26px;
}

.rcalculator .rc-step-active {
    display: block;
    animation: rcFade .3s;
}

@keyframes rcFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rcSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rcalculator .rc-question {
    margin-bottom: 18px;
    color: #222;
    font-size: 16px;
    font-weight: 700;
}

.rcalculator .rc-question span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    color: #fff;
    background: var(--rc-accent);
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    box-shadow: 0 6px 12px rgba(35, 120, 3, .18);
}

.rcalculator .rc-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rcalculator .rc-option {
    width: 100%;
    padding: 14px 18px;
    color: #333;
    background: #fff;
    border: 2px solid #e3e6e1;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    text-align: left;
    transition: all .2s ease;
}

.rcalculator .rc-option:hover,
.rcalculator .rc-option:focus {
    border-color: var(--rc-accent);
    background: #f7fbf4;
    outline: none;
}

.rcalculator .rc-option.rc-selected,
.rcalculator .rc-animal.rc-selected {
    color: var(--rc-accent);
    background: var(--rc-accent-soft);
    border-color: var(--rc-accent);
    box-shadow: inset 0 0 0 1px rgba(35, 120, 3, .08);
}

.rcalculator .rc-animal-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.rcalculator .rc-animal {
    flex: 1;
    padding: 18px;
    font-size: 16px;
    text-align: center;
}

.rcalculator .rc-animal svg {
    display: block;
    margin: 0 auto 8px;
}

.rcalculator .rc-input-group {
    position: relative;
    margin-bottom: 12px;
}

.rcalculator .rc-input-group input {
    width: 100%;
    padding: 12px 14px;
    color: #333;
    background: #fff;
    border: 2px solid #e3e6e1;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.rcalculator .rc-input-group input:focus {
    border-color: var(--rc-accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(215, 238, 194, .55);
}

.rcalculator .rc-input-group p {
    margin: 6px 0 0;
    color: #666;
    font-size: 11px;
}

.rcalculator .rc-suggestions {
    display: none;
    max-height: 160px;
    overflow-y: auto;
    margin-top: -8px;
    background: #fff;
    border: 2px solid #e3e6e1;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    position: relative;
    z-index: 2;
}

.rcalculator .rc-suggestions.rc-show {
    display: block;
}

.rcalculator .rc-suggestion-item {
    padding: 10px 12px;
    color: #333;
    cursor: pointer;
    font-size: 13px;
}

.rcalculator .rc-suggestion-item:hover {
    background: #f7fbf4;
}

.rcalculator .rc-buttons {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.rcalculator .rc-btn {
    flex: 1;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: all .2s ease;
}

.rcalculator .rc-btn-prev {
    color: #334;
    background: #edf0eb;
}

.rcalculator .rc-btn-prev:hover {
    background: #dfe5da;
}

.rcalculator .rc-btn-next {
    color: #fff;
    background: var(--rc-accent);
    box-shadow: 0 10px 22px rgba(35, 120, 3, .18);
}

.rcalculator .rc-btn-next:hover {
    background: #1d6402;
    transform: translateY(-1px);
}

.rcalculator .rc-btn-next:disabled {
    background: #cad4c3;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.rcalculator .rc-results {
    display: none;
    padding: 26px;
}

.rcalculator .rc-results.rc-show {
    display: block;
}

.rcalculator .rc-result-card {
    padding: 18px;
    margin-bottom: 14px;
    background: #fbfcfa;
    border: 1px solid #e8ece5;
    border-radius: 14px;
}

.rcalculator .rc-result-title {
    margin-bottom: 8px;
    color: var(--rc-accent);
    font-size: 14px;
    font-weight: 700;
}

.rcalculator .rc-result-value {
    margin-bottom: 3px;
    color: #222;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.rcalculator .rc-result-desc {
    color: #666;
    font-size: 12px;
}

.rcalculator .rc-bag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.rcalculator .rc-bag-item {
    padding: 10px;
    background: #fff;
    border: 1px solid #e3e6e1;
    border-radius: 10px;
    text-align: center;
}

.rcalculator .rc-bag-size {
    margin-bottom: 3px;
    color: #666;
    font-size: 11px;
}

.rcalculator .rc-bag-duration {
    color: var(--rc-accent);
    font-size: 14px;
    font-weight: 700;
}

.rcalculator .rc-meal-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e6e9e3;
    color: #333;
    font-size: 13px;
}

.rcalculator .rc-meal-item:last-child {
    border-bottom: 0;
}

.rcalculator .rc-meal-label {
    font-weight: 600;
}

.rcalculator .rc-meal-value {
    color: var(--rc-accent);
    font-weight: 700;
    text-align: right;
}

.rcalculator .rc-product-line {
    padding: 12px;
    margin-bottom: 10px;
    background: #f4f8f1;
    border: 0;
    border-radius: 10px;
}

.rcalculator .rc-product-line .rc-meal-label,
.rcalculator .rc-product-line .rc-meal-value {
    color: var(--rc-accent);
    font-size: 15px;
}

.rcalculator .rc-cart-button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--rc-color), var(--rc-color-dark));
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(250, 132, 0, .2);
}

.rcalculator .rc-cart-button:hover {
    filter: brightness(.97);
    transform: translateY(-1px);
}

.rcalculator .rc-cart-button:disabled {
    cursor: wait;
    opacity: .75;
}

.rcalculator .rc-reset-button {
    width: 100%;
    margin-top: 10px;
}

.rcalculator .rc-spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rcSpin 1s linear infinite;
}

.rcalculator .rc-visual {
    position: relative;
    height: 100%;
    min-height: 100%;
    background: #f3f5f2;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .07);
}

.rcalculator .rc-visual img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

.rcalculator .rc-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.02) 0%, rgba(0,0,0,.08) 45%, rgba(0,0,0,.38) 100%);
    pointer-events: none;
}

.rcalculator .rc-visual-content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    color: #fff;
}

.rcalculator .rc-visual-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.88);
    color: var(--rc-accent);
    font-size: 12px;
    font-weight: 700;
}

.rcalculator .rc-visual-content h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    line-height: 1.2;
}

.rcalculator .rc-visual-content p {
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .rcalculator .rc-layout.rc-layout-has-image {
        grid-template-columns: 1fr;
    }

    .rcalculator .rc-visual {
        min-height: 360px;
    }
}

@media (max-width: 480px) {
    .rcalculator {
        padding: 12px 0;
    }

    .rcalculator .rc-card {
        border-radius: 16px;
    }

    .rcalculator .rc-header h2 {
        font-size: 18px;
    }

    .rcalculator .rc-step,
    .rcalculator .rc-results {
        padding: 20px;
    }

    .rcalculator .rc-bag-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rcalculator .rc-question {
        font-size: 14px;
    }

    .rcalculator .rc-option {
        padding: 12px 14px;
        font-size: 13px;
    }

    .rcalculator .rc-animal-grid {
        gap: 10px;
    }

    .rcalculator .rc-animal {
        padding: 15px 12px;
        font-size: 15px;
    }

    .rcalculator .rc-result-value {
        font-size: 24px;
    }

    .rcalculator .rc-meal-item,
    .rcalculator .rc-meal-label,
    .rcalculator .rc-meal-value {
        font-size: 12px;
    }

    .rcalculator .rc-visual {
        min-height: 280px;
        border-radius: 18px;
    }

    .rcalculator .rc-visual-content h3 {
        font-size: 18px;
    }
}
