/* Recipe Generator Plugin Styles - Compatible with Divi Theme */

/* Main Container */
#recipe-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: inherit;
}

/* Usage Info */
.recipe-usage-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Button Styles */
#generate-recipe-btn,
.save-recipe-btn,
.print-recipe-btn,
.retry-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    margin-right: 10px;
}

#generate-recipe-btn:hover,
.save-recipe-btn:hover,
.print-recipe-btn:hover,
.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

#generate-recipe-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.save-recipe-btn.saved {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

/* Usage Limit Styles */
.usage-limit-reached {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.usage-limit-reached p {
    margin: 0;
    font-size: 16px;
}

.usage-limit-reached a {
    color: #e74c3c !important;
    font-weight: 600;
    text-decoration: none;
}

/* Loading Styles */
#recipe-loading {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

#recipe-loading p {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
    position: relative;
}

#recipe-loading p::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #007cba;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Recipe Result Styles */
.generated-recipe {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
}

.recipe-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.recipe-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
}

.recipe-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.recipe-content {
    padding: 25px;
    line-height: 1.6;
}

.recipe-content h1,
.recipe-content h2,
.recipe-content h3,
.recipe-content h4 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
}

.recipe-content h1:first-child,
.recipe-content h2:first-child,
.recipe-content h3:first-child {
    margin-top: 0;
}

.recipe-content ul,
.recipe-content ol {
    padding-left: 25px;
}

.recipe-content li {
    margin-bottom: 8px;
}

.recipe-content strong {
    color: #2c3e50;
}

.usage-info {
    background: #f8f9fa;
    padding: 15px 25px;
    border-top: 1px solid #e1e5e9;
    font-size: 14px;
    color: #6c757d;
}

.usage-info p {
    margin: 0;
}

/* Recipe Error Styles */
.recipe-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.recipe-error h3 {
    margin-top: 0;
    color: #721c24;
}

/* User Recipes Styles */
#user-recipes-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

#user-recipes-container h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.recipe-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipe-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    line-height: 1.4;
}

.recipe-meta {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.recipe-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.view-recipe {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-recipe:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.delete-recipe {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-recipe:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    #recipe-generator-container,
    #user-recipes-container {
        padding: 15px;
        margin: 10px;
    }
    
    .recipe-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .recipe-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #generate-recipe-btn,
    .save-recipe-btn,
    .print-recipe-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .recipe-actions {
        flex-direction: column;
    }
    
    .form-group select,
    .form-group input[type="text"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .recipe-header h3 {
        font-size: 20px;
    }
    
    .recipe-content {
        padding: 20px 15px;
    }
    
    #user-recipes-container h3 {
        font-size: 24px;
    }
}

/* Divi Theme Compatibility */
.et_pb_module #recipe-generator-container,
.et_pb_module #user-recipes-container {
    font-family: inherit;
}

.et_pb_module .recipe-content h1,
.et_pb_module .recipe-content h2,
.et_pb_module .recipe-content h3,
.et_pb_module .recipe-content h4 {
    font-family: inherit;
}

/* Print Styles */
@media print {
    .recipe-header,
    .recipe-actions,
    .usage-info,
    #generate-recipe-btn,
    .save-recipe-btn,
    .print-recipe-btn {
        display: none !important;
    }
    
    .generated-recipe,
    .recipe-content {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
    margin-bottom: 25px;
    border-left: 4px solid #007cba;
}

.recipe-usage-info p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.upgrade-link {
    color: #e74c3c !important;
    text-decoration: none !important;
    font-weight: 600;
}

.upgrade-link:hover {
    text-decoration: underline !important;
}

/* Form Styles */
#recipe-generator-form {
    background: #fff;
    padding: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;