/* Calculadora de Custos e Precificação - Amor e Fogão */

.rp-hero {
    background: linear-gradient(135deg, var(--af-color-quinternary) 0%, var(--af-color-quaternary) 100%);
    padding: 3rem 0;
    margin-bottom: var(--component-spacing);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(29, 53, 87, 0.14);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.rp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 45%);
    pointer-events: none;
}

.rp-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    padding: 0 2rem;
}

.rp-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.rp-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    max-width: 38rem;
    line-height: 1.6;
}

.rp-hero-image i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.85);
}

.rp-section {
    padding: 0 0 3rem;
}

.rp-guide {
    display: grid;
    gap: 1rem;
    margin-bottom: var(--component-spacing);
}

.rp-guide-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
}

.rp-guide-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--af-color-quinternary);
    margin: 0 0 1.25rem;
}

.rp-guide-steps {
    list-style: none;
    counter-reset: rp-step;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.rp-guide-steps li {
    counter-increment: rp-step;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    align-items: start;
    padding: 1rem 1.1rem;
    background: #FAF6F0;
    border-radius: 14px;
    border: 1px solid rgba(69, 123, 157, 0.12);
}

.rp-guide-steps li::before {
    content: counter(rp-step);
    grid-row: 1 / span 2;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--af-color-primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rp-guide-steps strong {
    color: var(--af-color-quinternary);
    font-size: 1.05rem;
}

.rp-guide-steps span {
    color: #5c6770;
    line-height: 1.55;
    font-size: 0.98rem;
}

.rp-layout {
    width: 100%;
}

.rp-panel {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
}

.rp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.rp-panel-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--af-color-quinternary);
    margin: 0 0 1rem;
}

.rp-panel-header .rp-panel-title {
    margin-bottom: 0;
}

.rp-btn-primary {
    background: var(--af-color-primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
}

.rp-btn-primary:hover {
    background: #d62839;
    color: #fff;
}

.rp-table-wrap {
    border: 1px solid rgba(69, 123, 157, 0.15);
    border-radius: 14px;
    overflow-x: auto;
}

.rp-table {
    --bs-table-bg: transparent;
    width: 100%;
    min-width: 1040px;
    table-layout: fixed;
}

.rp-table thead th {
    font-size: 0.95rem;
    color: var(--af-color-quaternary);
    font-weight: 600;
    white-space: nowrap;
    border-bottom-color: rgba(69, 123, 157, 0.2);
    background: rgba(168, 218, 220, 0.18);
    padding: 1rem 0.9rem;
}

.rp-table td {
    vertical-align: middle;
    padding: 0.9rem;
}

.rp-table th:nth-child(1),
.rp-table td:nth-child(1) {
    width: 20%;
}

.rp-table th:nth-child(2),
.rp-table td:nth-child(2) {
    width: 14%;
}

.rp-table th:nth-child(3),
.rp-table td:nth-child(3),
.rp-table th:nth-child(4),
.rp-table td:nth-child(4) {
    width: 22%;
}

.rp-table th:nth-child(5),
.rp-table td:nth-child(5) {
    width: 12%;
}

.rp-table th:nth-child(6),
.rp-table td:nth-child(6) {
    width: 72px;
    min-width: 72px;
    padding-left: 0.35rem;
    padding-right: 0.75rem;
    text-align: center;
}

.rp-input,
.rp-unit-select,
.rp-panel .form-control,
.rp-panel .form-select {
    border-radius: 12px;
    border: 1.5px solid rgba(69, 123, 157, 0.25);
    min-height: 52px;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
}

.rp-panel .form-control-lg,
.rp-panel .input-group-lg > .form-control,
.rp-panel .input-group-lg > .input-group-text {
    min-height: 56px;
    font-size: 1.1rem;
}

.rp-panel .form-label {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--af-color-quinternary);
    margin-bottom: 0.45rem;
}

.rp-unit-field {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) 76px;
    gap: 0.5rem;
}

.rp-unit-field .rp-input {
    min-width: 110px;
    width: 100%;
}

.rp-subtotal,
.rp-mobile-subtotal {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--af-color-quinternary);
    white-space: nowrap;
}

.rp-mobile-subtotal {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #FAF6F0;
    border-radius: 12px;
}

.rp-btn-remove {
    color: var(--af-color-primary);
    border: 1px solid rgba(230, 57, 70, 0.25);
    border-radius: 12px;
    background: #fff;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.rp-btn-remove:hover {
    background: rgba(230, 57, 70, 0.08);
    color: var(--af-color-primary);
}

.rp-ingredients-total {
    margin: 1.25rem 0 0;
    text-align: right;
    color: var(--af-color-quinternary);
    font-size: 1.1rem;
}

.rp-mobile-list {
    display: none;
    gap: 1rem;
}

.rp-mobile-card {
    border: 1px solid rgba(69, 123, 157, 0.15);
    border-radius: 14px;
    padding: 1.15rem;
    background: #fff;
}

.rp-mobile-card-top {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.rp-margin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.rp-chip {
    border: 1px solid rgba(69, 123, 157, 0.25);
    background: #fff;
    color: var(--af-color-quinternary);
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    font-size: 1rem;
}

.rp-chip.is-active,
.rp-chip:hover {
    background: var(--af-color-primary);
    border-color: var(--af-color-primary);
    color: #fff;
}

.rp-results {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
}

.rp-results-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--af-color-quinternary);
    margin: 0 0 1rem;
}

.rp-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.rp-result-card {
    background: #FAF6F0;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border: 1px solid transparent;
    min-height: 110px;
}

.rp-result-card--highlight {
    background: rgba(230, 57, 70, 0.08);
    border-color: rgba(230, 57, 70, 0.2);
}

.rp-result-card--profit {
    background: rgba(168, 218, 220, 0.35);
    border-color: rgba(69, 123, 157, 0.2);
}

.rp-result-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--af-color-quaternary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rp-result-value {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--af-color-quinternary);
    line-height: 1.2;
}

.rp-results-note {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: #6c757d;
}

.rp-tips {
    background: linear-gradient(135deg, rgba(168, 218, 220, 0.25), rgba(241, 250, 238, 0.8));
    border-radius: 18px;
    padding: 1.5rem;
    margin: 0;
}

.rp-tips-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--af-color-quinternary);
    margin-bottom: 0.75rem;
}

.rp-tips-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--af-color-quinternary);
}

.rp-tips-list li + li {
    margin-top: 0.4rem;
}

@media (max-width: 1199.98px) {
    .rp-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .rp-table-wrap {
        display: none;
    }

    .rp-mobile-list {
        display: grid;
    }

    .rp-ingredients-total {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .rp-hero {
        padding: 2rem 0;
        border-radius: 16px;
    }

    .rp-hero-content {
        padding: 0 1.25rem;
    }

    .rp-hero-image {
        display: none;
    }

    .rp-panel {
        padding: 1.15rem;
    }

    .rp-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .rp-btn-primary {
        width: 100%;
    }

    .rp-results-grid {
        grid-template-columns: 1fr;
    }

    .rp-input,
    .rp-unit-select,
    .rp-panel .form-control,
    .rp-panel .form-select {
        min-height: 48px;
        font-size: 1rem;
    }
}
