/* AI Recipe Generator Pro - Modern Design */

.airp-recipe-card {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.airp-recipe-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.airp-recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.airp-recipe-header {
    padding: 40px 40px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.airp-recipe-title {
    margin: 0 0 16px;
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.airp-recipe-description {
    margin: 0;
    font-size: 17px;
    color: #666;
    line-height: 1.7;
}

.airp-recipe-rating-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 20px;
    background: #fffbf0;
    border-radius: 12px;
    display: inline-flex;
}

.airp-stars {
    display: flex;
    gap: 3px;
}

.airp-star {
    font-size: 18px;
    color: #e0e0e0;
}

.airp-star.filled {
    color: #ffc107;
}

.airp-rating-text {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.airp-recipe-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0;
    background: #fafbfc;
    border-bottom: 1px solid #f0f0f0;
}

.airp-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    text-align: center;
    border-right: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.airp-meta-item:last-child {
    border-right: none;
}

.airp-meta-item:hover {
    background: #fff;
}

.airp-meta-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.airp-meta-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.airp-meta-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 6px;
}

.airp-meta-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.airp-difficulty-easy { 
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.airp-difficulty-medium { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.airp-difficulty-hard { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.airp-recipe-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 20px;
}

.airp-servings-adjuster {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 50px;
}

.airp-btn-adjust {
    width: 42px;
    height: 42px;
    border: 2px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.airp-btn-adjust svg {
    stroke: #667eea;
    stroke-linecap: round;
}

.airp-btn-adjust:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.airp-btn-adjust:hover svg {
    stroke: #ffffff;
}

#airp-servings-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.airp-unit-toggle {
    display: flex;
    gap: 0;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 50px;
}

.airp-unit-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.airp-unit-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.airp-unit-btn:hover:not(.active) {
    background: #e9ecef;
}

.airp-recipe-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 50px;
    padding: 40px;
}

@media (max-width: 768px) {
    .airp-recipe-content {
        grid-template-columns: 1fr;
    }
}

.airp-ingredients-section h3,
.airp-instructions-section h3 {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    position: relative;
    padding-bottom: 12px;
}

.airp-ingredients-section h3::after,
.airp-instructions-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.airp-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.airp-ingredient-item {
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.airp-ingredient-item::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    flex-shrink: 0;
}

.airp-ingredient-quantity {
    font-weight: 700;
    color: #667eea;
    min-width: 45px;
}

.airp-ingredient-unit {
    color: #999;
    min-width: 60px;
}

.airp-ingredient-name {
    color: #1a1a1a;
    font-weight: 500;
}

.airp-instructions-list {
    padding-left: 0;
    counter-reset: step-counter;
    list-style: none;
    margin: 0;
}

.airp-instruction-item {
    counter-increment: step-counter;
    margin-bottom: 28px;
    padding-left: 60px;
    position: relative;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.airp-instruction-item::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.airp-rating-section {
    padding: 40px;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    border-top: 1px solid #f0f0f0;
}

.airp-rating-section h3 {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.airp-rating-form {
    max-width: 500px;
}

.airp-rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 24px;
}

.airp-rating-stars input[type="radio"] {
    display: none;
}

.airp-rating-stars label {
    font-size: 40px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.airp-rating-stars label:hover,
.airp-rating-stars label:hover ~ label,
.airp-rating-stars input:checked ~ label {
    color: #ffc107;
    transform: scale(1.1);
}

.airp-rating-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.airp-rating-author,
.airp-rating-comment {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.airp-rating-author:focus,
.airp-rating-comment:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.airp-submit-rating {
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.airp-submit-rating:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.airp-submit-rating:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.airp-rating-message {
    padding: 14px 20px;
    background: #fff;
    border-radius: 12px;
    margin-top: 16px;
    font-weight: 600;
    text-align: center;
}

.airp-recipe-actions {
    display: flex;
    gap: 16px;
    padding: 30px 40px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.airp-action-btn {
    flex: 1;
    min-width: 160px;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.airp-action-btn svg {
    flex-shrink: 0;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.airp-btn-pinterest {
    background: linear-gradient(135deg, #e60023 0%, #c5001f 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 0, 35, 0.3);
}

.airp-btn-pinterest:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(230, 0, 35, 0.4);
    color: #fff;
}

.airp-btn-print {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.airp-btn-print:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.airp-error {
    padding: 24px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border: 2px solid #fcc;
    border-radius: 12px;
    color: #c33;
    text-align: center;
    font-weight: 600;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    .airp-recipe-card,
    .airp-recipe-card * {
        visibility: visible;
    }
    
    .airp-recipe-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border: none;
    }
    
    .airp-recipe-image {
        height: 250px;
    }
    
    .airp-recipe-controls,
    .airp-rating-section,
    .airp-recipe-actions {
        display: none !important;
    }
    
    .airp-instruction-item::before {
        background: #000 !important;
    }
    
    .airp-meta-icon {
        background: #000 !important;
    }
}

@media (max-width: 768px) {
    .airp-recipe-card {
        margin: 20px;
        border-radius: 16px;
    }
    
    .airp-recipe-title {
        font-size: 28px;
    }
    
    .airp-recipe-header,
    .airp-recipe-content,
    .airp-recipe-controls,
    .airp-rating-section,
    .airp-recipe-actions {
        padding: 24px;
    }
    
    .airp-recipe-content {
        gap: 32px;
    }
    
    .airp-meta-item {
        padding: 20px 12px;
    }
}