/* Original Calculator Styles */
#protein-calculator {
    max-width: 800px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pc-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pc-section h3 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.pc-input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pc-input-group label {
    font-weight: bold;
    min-width: 120px;
    color: #34495e;
}

.pc-input-group input,
.pc-input-group select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.pc-input-group input:focus,
.pc-input-group select:focus {
    outline: none;
    border-color: #3498db;
}

.pc-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.pc-button:hover {
    background: #2980b9;
}

.pc-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pc-button-secondary {
    background: #95a5a6;
    margin-top: 20px;
}

.pc-button-secondary:hover {
    background: #7f8c8d;
}

.pc-target {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 5px;
    margin-bottom: 20px;
}

.pc-progress-container {
    margin-bottom: 20px;
}

.pc-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.pc-progress-bar {
    width: 100%;
    height: 30px;
    background: #ecf0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.pc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 15px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.pc-success-message {
    background: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pc-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pc-food-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s;
}

.pc-food-item:hover {
    border-color: #3498db;
}

.pc-food-item h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.pc-serving-info {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0 0 10px 0;
}

.food-input {
    width: 60px;
    text-align: center;
}

/* Save Status Messages */
.pc-save-status {
    margin-top: 15px;
}

.pp-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
}

.pp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

/* Profile Display Styles */
#protein-profile {
    max-width: 800px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pp-header {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.pp-header h2 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.pp-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pp-section h3 {
    color: #2c3e50;
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.pp-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.pp-section-header h3 {
    margin-bottom: 0;
    flex-grow: 1;
}

.pp-edit-link {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-left: 15px;
}

.pp-edit-link:hover {
    background: #2980b9;
    text-decoration: none;
    color: white;
}

/* Micronutrients Profile Styling */
.pp-micronutrients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pp-micronutrient-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.pp-nutrient-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.pp-nutrient-breakdown {
    margin-bottom: 10px;
}

.pp-from-diet {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 5px;
}

.pp-from-supplement {
    color: #f39c12;
    font-size: 14px;
    margin-bottom: 5px;
}

.pp-no-supplement {
    color: #2ecc71;
    font-weight: bold;
    font-size: 14px;
}

.pp-nutrient-target {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.pp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pp-stat-item {
    background: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.pp-stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: bold;
}

.pp-stat-value {
    font-size: 24px;
    color: #2c3e50;
    font-weight: bold;
}

.pp-meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.pp-meal-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.pp-food-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.pp-servings {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.pp-protein-amount {
    color: #27ae60;
    font-weight: bold;
}

.pp-total-section {
    background: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.pp-total-protein {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.pp-percentage {
    font-size: 16px;
    color: #27ae60;
    font-weight: normal;
}

.pp-actions {
    text-align: center;
    padding-top: 10px;
}

.pp-button {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 5px;
    display: inline-block;
    font-size: 16px;
    transition: background-color 0.3s;
}

.pp-button:hover {
    background: #2980b9;
    text-decoration: none;
    color: white;
}

.pp-no-profile {
    text-align: center;
    padding: 40px 20px;
}

.pp-no-profile h3 {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.pp-no-profile p {
    color: #95a5a6;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .pc-input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pc-input-group label {
        min-width: auto;
    }
    
    .pc-food-grid {
        grid-template-columns: 1fr;
    }
    
    .pp-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pp-meal-grid {
        grid-template-columns: 1fr;
    }
    
    .pp-stat-value {
        font-size: 20px;
    }
    
    .pp-total-protein {
        font-size: 20px;
    }
}