/* ROI Calculator Popup Styles */
.roi-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 10000;
    overflow-y: auto;
}

.roi-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.roi-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    position: relative;
}

.roi-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.roi-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.roi-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.roi-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.roi-step {
    margin-bottom: 30px;
}

.roi-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #00d084;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.roi-step-number {
    background: #00d084;
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Feed Type Selection */
.feed-type-selection {
    margin-bottom: 25px;
}

.feed-type-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-type-group label {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 16px;
}

.feed-type-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.feed-type-select:focus {
    outline: none;
    border-color: #00d084;
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.feed-type-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

.currency-info {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0, 208, 132, 0.1);
    border: 1px solid rgba(0, 208, 132, 0.3);
    border-radius: 10px;
    color: #00d084;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.currency-info:hover {
    background: rgba(0, 208, 132, 0.15);
    border-color: rgba(0, 208, 132, 0.4);
}

.currency-info i {
    font-size: 16px;
    color: #00d084;
}

/* Animal Selection */
.animal-selection {
    margin-bottom: 25px;
}

.animal-select-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.animal-select-group label {
    color: #e0e0e0;
    font-weight: 500;
    font-size: 16px;
}

.animal-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.animal-select:focus {
    outline: none;
    border-color: #00d084;
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.animal-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

.animal-input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.animal-input-row .input-group {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Allow flex items to shrink */
}

.animal-input-row .flex-1 {
    flex: 1;
}

.animal-input-row .flex-2 {
    flex: 2;
}

.animal-input-row .add-animal-btn {
    margin-top: 0;
    align-self: end;
    height: 45px; /* Match input height */
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.roi-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.roi-input:focus {
    outline: none;
    border-color: #00d084;
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

.input-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.roi-input.percentage {
    text-align: center;
}

.roi-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.add-animal-btn {
    background: linear-gradient(135deg, #00d084, #00b872);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0, 208, 132, 0.3);
}

.add-animal-btn:hover {
    background: linear-gradient(135deg, #00b872, #009b61);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 208, 132, 0.4);
}

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

/* Animal List */
.animal-list {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-top: 25px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.animal-list-title {
    color: #00d084;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.animal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    margin-bottom: 14px;
    transition: all 0.3s ease;
    animation: slideInUp 0.4s ease-out;
}

.animal-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 208, 132, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 208, 132, 0.1);
}

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

.animal-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.animal-icon {
    background: rgba(0, 208, 132, 0.1);
    color: #00d084;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.animal-emoji {
    font-size: 24px;
    line-height: 1;
}

.animal-details {
    flex: 1;
}

.animal-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.animal-stats {
    color: #00d084;
    font-size: 14px;
    margin-bottom: 2px;
}

.animal-consumption {
    color: #aaa;
    font-size: 13px;
}

.remove-animal-btn {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.remove-animal-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.remove-animal-btn:active {
    transform: scale(0.95);
}

/* Calculate Button */
.calculate-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #00d084 0%, #00b872 100%);
    border-radius: 12px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.calculate-btn {
    background: #000;
    color: #00d084;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 208, 132, 0.3);
}

.calculate-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.download-pdf-btn {
    background: #fff;
    color: #00d084;
    border: 2px solid #00d084;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.download-pdf-btn:hover {
    background: #00d084;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 208, 132, 0.3);
}

.download-pdf-btn i {
    font-size: 16px;
}

.share-btn {
    background: linear-gradient(135deg, #FF6B6B, #E55353);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-decoration: none;
}

.share-btn:hover {
    background: linear-gradient(135deg, #E55353, #CC4848);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.share-btn i {
    font-size: 18px;
}

/* Results Section */
.roi-results {
    display: none;
    margin-top: 30px;
}

.roi-results.active {
    display: block;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.result-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #00d084;
}

.result-title {
    color: #00d084;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.result-value {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.result-description {
    color: #aaa;
    font-size: 14px;
}

/* Benefits Section */
.benefits-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.benefits-title {
    color: #00d084;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
}

.benefit-icon {
    color: #00d084;
    font-size: 20px;
    margin-top: 2px;
    min-width: 20px;
}

.benefit-content h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.benefit-content p {
    color: #aaa;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

/* Chart Container */
.chart-container {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.chart-title {
    color: #00d084;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.chart-placeholder {
    height: 200px;
    background: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .roi-modal-content {
        padding: 20px;
        margin: 10px;
    }

    .roi-modal-title {
        font-size: 22px;
    }
    
    .animal-selection {
        grid-template-columns: 1fr;
    }
    
    .animal-input-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .animal-input-row .add-animal-btn {
        height: auto;
        padding: 12px 24px;
    }

    .add-animal-btn {
        width: 100%;
        justify-self: stretch;
    }

    .animal-info {
        gap: 10px;
    }

    .animal-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .animal-emoji {
        font-size: 20px;
    }

    .animal-name {
        font-size: 15px;
    }

    .animal-stats {
        font-size: 13px;
    }

    .animal-consumption {
        font-size: 12px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .roi-step-title {
        font-size: 18px;
    }

    .roi-step-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .calculate-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .calculate-btn,
    .download-pdf-btn,
    .share-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        margin-left: 0;
        margin-bottom: 10px;
    }
}

.hidden {
    display: none;
}

.download-pdf-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #333;
    border-radius: 50%;
    border-top-color: #00d084;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.roi-results.active {
    animation: fadeInUp 0.5s ease-out;
}

/* Tooltip */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 92%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
} 