/* ============================================
   Raw Feeding Calculator - WordPress Plugin
   Southern Raw Pet Meats
   ============================================ */

/* CSS Variables - Scoped to plugin wrapper */
.rfc-calculator-wrapper {
    --primary-green: #AFCB74;
    --dark-grey: #3d3d3d;
    --medium-grey: #666666;
    --light-grey: #f5f5f5;
    --white: #ffffff;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base Styles - Scoped */
.rfc-calculator-wrapper * {
    box-sizing: border-box;
}

.rfc-calculator-wrapper {
    font-family: inherit;
    color: var(--dark-grey);
    line-height: 1.6;
    margin: 2rem 0;
}

/* Calculator Wrapper */
.rfc-calculator-wrapper .calculator-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

/* Print Only Logo */
.rfc-calculator-wrapper .print-only-logo {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Calculator Container */
.rfc-calculator-wrapper .calculator-container {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Header */
.rfc-calculator-wrapper .calculator-header {
    background: var(--primary-green);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rfc-calculator-wrapper .header-icon {
    flex-shrink: 0;
}

.rfc-calculator-wrapper .header-icon img {
    width: 48px;
    height: 48px;
    display: block;
}

.rfc-calculator-wrapper .header-text h2 {
    font-family: inherit;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.rfc-calculator-wrapper .header-text .tagline {
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
}

/* Calculator Content */
.rfc-calculator-wrapper .calculator-content {
    padding: 2.5rem 2rem;
}

/* Steps */
.rfc-calculator-wrapper .calculator-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.rfc-calculator-wrapper .calculator-step.active {
    display: block;
}

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

.rfc-calculator-wrapper .step-title {
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-grey);
    text-align: center;
    margin: 0 0 2rem 0;
}

/* Pet Type Grid */
.rfc-calculator-wrapper .pet-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rfc-calculator-wrapper .pet-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.rfc-calculator-wrapper .pet-card:hover {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.03);
}

.rfc-calculator-wrapper .pet-card.selected {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.08);
}

.rfc-calculator-wrapper .pet-icon {
    width: 80px;
    height: 80px;
}

.rfc-calculator-wrapper .pet-label {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-grey);
}

/* Life Stage Grid */
.rfc-calculator-wrapper .life-stage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rfc-calculator-wrapper .life-stage-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.rfc-calculator-wrapper .life-stage-card:hover {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.03);
}

.rfc-calculator-wrapper .life-stage-card.selected {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.08);
}

.rfc-calculator-wrapper .life-stage-icon {
    width: 70px;
    height: 70px;
}

.rfc-calculator-wrapper .life-stage-label {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--dark-grey);
    text-align: center;
}

/* Activity List */
.rfc-calculator-wrapper .activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rfc-calculator-wrapper .activity-option {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 1rem;
    font-weight: 400;
    color: var(--dark-grey);
}

.rfc-calculator-wrapper .activity-option:hover {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.03);
}

.rfc-calculator-wrapper .activity-option.selected {
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.08);
    font-weight: 500;
}

/* Weight Input */
.rfc-calculator-wrapper .weight-input-container {
    margin-bottom: 2rem;
}

.rfc-calculator-wrapper .weight-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-grey);
    margin-bottom: 0.75rem;
}

.rfc-calculator-wrapper .weight-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: inherit;
}

.rfc-calculator-wrapper .weight-input:focus {
    outline: none;
    border-color: var(--primary-green);
    background: rgba(175, 203, 116, 0.03);
}

.rfc-calculator-wrapper .weight-input::placeholder {
    color: #999;
}

.rfc-calculator-wrapper .helper-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--medium-grey);
}

/* Buttons */
.rfc-calculator-wrapper .btn-back,
.rfc-calculator-wrapper .btn-calculate,
.rfc-calculator-wrapper .btn-action {
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.rfc-calculator-wrapper .btn-icon {
    width: 20px;
    height: 20px;
}

.rfc-calculator-wrapper .btn-green-outline {
    background: var(--white);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.rfc-calculator-wrapper .btn-green-outline:hover {
    background: rgba(175, 203, 116, 0.08);
}

.rfc-calculator-wrapper .btn-calculate {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--white);
}

.rfc-calculator-wrapper .btn-calculate:hover {
    background: #78b655;
    border-color: #78b655;
}

.rfc-calculator-wrapper .btn-green {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--white);
}

.rfc-calculator-wrapper .btn-green:hover {
    background: #78b655;
    border-color: #78b655;
}

.rfc-calculator-wrapper .btn-white-outline {
    background: var(--white);
    border-color: #d0d0d0;
    color: var(--dark-grey);
}

.rfc-calculator-wrapper .btn-white-outline:hover {
    border-color: #b0b0b0;
    background: var(--light-grey);
}

.rfc-calculator-wrapper .button-row {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

/* Results */
.rfc-calculator-wrapper .results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rfc-calculator-wrapper .result-card {
    background: var(--light-grey);
    border-radius: var(--border-radius);
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.rfc-calculator-wrapper .result-card.full-width {
    grid-column: 1 / -1;
}

.rfc-calculator-wrapper .result-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
}

.rfc-calculator-wrapper .result-card h4 {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--medium-grey);
    margin: 0 0 0.75rem 0;
}

.rfc-calculator-wrapper .result-value {
    font-family: inherit;
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary-green);
    margin: 0;
    line-height: 1.2;
}

.rfc-calculator-wrapper .result-text {
    font-size: 1rem;
    color: var(--dark-grey);
    line-height: 1.7;
    margin: 0;
}

.rfc-calculator-wrapper .reminders-card {
    background: rgba(175, 203, 116, 0.08);
    text-align: left;
}

.rfc-calculator-wrapper .reminders-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rfc-calculator-wrapper .reminders-list li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--dark-grey);
}

.rfc-calculator-wrapper .reminders-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Action Buttons */
.rfc-calculator-wrapper .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.rfc-calculator-wrapper .calculator-footer {
    background: var(--light-grey);
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
}

.rfc-calculator-wrapper .disclaimer {
    font-size: 0.875rem;
    color: var(--medium-grey);
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

.rfc-calculator-wrapper .disclaimer strong {
    color: var(--dark-grey);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .calculator-content {
        padding: 2rem 1.5rem;
    }

    .header-text h2 {
        font-size: 1.5rem;
    }

    .pet-type-grid,
    .life-stage-grid {
        grid-template-columns: 1fr;
    }

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

    .button-row {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-back,
    .btn-calculate,
    .btn-action {
        width: 100%;
        justify-content: center;
    }
}

/* Print Styles */
@media print {
    @page {
        size: A4;
        margin: 12mm 15mm;
    }

    /* Hide everything on the page first */
    body * {
        visibility: hidden !important;
    }
    
    /* Explicitly hide WordPress/Elementor elements */
    header[data-elementor-type="header"],
    footer[data-elementor-type="footer"],
    .elementor-location-header,
    .elementor-location-footer,
    #wpadminbar,
    .no-print,
    nav,
    .breadcrumbs,
    .jet-breadcrumbs,
    .site-header,
    .site-footer {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show only the calculator wrapper and its contents */
    .rfc-calculator-wrapper,
    .rfc-calculator-wrapper * {
        visibility: visible !important;
    }
    
    /* CRITICAL: Force logo to be visible */
    .rfc-calculator-wrapper .print-only-logo,
    .print-only-logo,
    div.print-only-logo,
    .rfc-calculator-wrapper > .print-only-logo {
        visibility: visible !important;
        display: block !important;
        opacity: 1 !important;
    }
    
    .rfc-calculator-wrapper .print-only-logo img,
    .print-only-logo img,
    div.print-only-logo img,
    .rfc-calculator-wrapper > .print-only-logo > img {
        visibility: visible !important;
        display: block !important;
        opacity: 1 !important;
    }
    
    /* Position calculator at top of page */
    .rfc-calculator-wrapper {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
    }

    body {
        background: #ffffff !important;
        padding: 0;
        font-size: 11pt;
    }

    .rfc-calculator-wrapper .calculator-wrapper {
        max-width: 100%;
    }

    .rfc-calculator-wrapper .calculator-container {
        box-shadow: none;
    }

    /* Force show print-only logo in print */
    .rfc-calculator-wrapper .print-only-logo,
    .print-only-logo,
    div.print-only-logo,
    .rfc-calculator-wrapper > .print-only-logo {
        position: static !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center;
        padding: 8px 0 12px 0;
        border-bottom: 2px solid #AFCB74 !important;
        page-break-after: avoid;
        max-width: 100% !important;
        min-height: 80px !important;
        background: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .rfc-calculator-wrapper .print-only-logo img,
    .print-only-logo img,
    div.print-only-logo img,
    .rfc-calculator-wrapper > .print-only-logo > img {
        max-width: 320px !important;
        width: 320px !important;
        max-height: 70px !important;
        height: auto !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin: 0 auto !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
        background: transparent !important;
        border: none !important;
        position: relative !important;
    }

    .rfc-calculator-wrapper .calculator-header {
        background: #ffffff;
        padding: 12px 0;
    }

    .rfc-calculator-wrapper .header-text h2 {
        color: #3d3d3d;
        font-size: 1.4rem;
    }

    .rfc-calculator-wrapper .header-text .tagline {
        color: #666666;
    }
    
    .rfc-calculator-wrapper .header-icon {
        display: none;
    }

    .rfc-calculator-wrapper .calculator-content {
        padding: 12px 0;
    }

    /* Hide all steps except results */
    .rfc-calculator-wrapper .calculator-step:not([data-step="results"]) {
        display: none !important;
    }

    /* Show results step */
    .rfc-calculator-wrapper .calculator-step[data-step="results"] {
        display: block !important;
    }

    .rfc-calculator-wrapper .step-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .rfc-calculator-wrapper .results-grid {
        gap: 10px;
        margin-bottom: 12px;
    }

    .rfc-calculator-wrapper .result-card {
        padding: 12px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .rfc-calculator-wrapper .result-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .rfc-calculator-wrapper .result-card h4 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .rfc-calculator-wrapper .result-value {
        color: var(--primary-green);
        font-size: 1.8rem;
    }

    .rfc-calculator-wrapper .result-text {
        font-size: 0.95rem;
    }

    .rfc-calculator-wrapper .reminders-list li {
        padding: 3px 0 3px 1.5rem;
        font-size: 0.9rem;
    }

    .rfc-calculator-wrapper .action-buttons {
        display: none !important;
    }

    .rfc-calculator-wrapper .calculator-footer {
        padding: 10px 0;
        margin-top: 12px;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .rfc-calculator-wrapper .disclaimer {
        font-size: 0.8rem;
    }
}
    }

    .result-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }

    .result-card h4 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .result-value {
        font-size: 1.8rem;
    }

    .result-text {
        font-size: 0.95rem;
    }

    .reminders-list li {
        padding: 3px 0 3px 1.5rem;
        font-size: 0.9rem;
    }

    .action-buttons {
        display: none;
    }

    .calculator-footer {
        padding: 10px 0;
        margin-top: 12px;
    }

    .disclaimer {
        font-size: 0.8rem;
    }
}
