/* ========================================
   Meal Agent Plugin Styles
   ======================================== */

/* Tier Selection Buttons */
.meal-agent-tier-selection {
    text-align: center;
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
}

.meal-agent-tier-selection h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 28px;
}

.tier-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.tier-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border: 3px solid #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tier-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.tier-btn.active {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Form Containers */
.meal-agent-form-container {
    display: none;
    margin: 30px 0;
}

.meal-agent-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.meal-agent-free-form h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.meal-agent-pro-form h2 {
    color: #764ba2;
    margin-bottom: 10px;
}

.form-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.form-group input[type="number"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 13px;
}

/* Checkbox Group */
.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-pro {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-upgrade {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
    margin-top: 15px;
}

/* Button Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Notes */
.upgrade-note,
.payment-note {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.upgrade-note a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.upgrade-note a:hover {
    text-decoration: underline;
}

/* Results Container */
.meal-results {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Score Cards Grid */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.score-card {
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

.score-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.score-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.score-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.score-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.score-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.score-level {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 8px;
}

.score-max {
    font-size: 24px;
    color: #888;
    font-weight: 400;
}

.score-subtitle {
    color: #666;
    font-size: 14px;
}

/* Report Content */
.report-content {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.report-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.report-text {
    color: #444;
    line-height: 1.8;
    font-size: 15px;
}

.report-text h3 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 20px;
}

.report-text h4 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.report-text strong {
    color: #333;
}

/* Upgrade CTA */
.upgrade-cta {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #ffffff;
    text-align: center;
}

.upgrade-cta h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 24px;
}

.upgrade-cta ul {
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
    list-style: none;
    padding: 0;
}

.upgrade-cta ul li {
    padding: 8px 0;
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.alert-info {
    background: #d1ecf1;
    border-left: 5px solid #0c5460;
    color: #0c5460;
}

.alert-error {
    background: #f8d7da;
    border-left: 5px solid #721c24;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tier-buttons {
        flex-direction: column;
    }
    
    .tier-btn {
        width: 100%;
    }
    
    .meal-agent-form {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
    }
    
    .meal-results {
        padding: 25px;
    }
}
