/**
 * Gluten-Free Meal Plan Generator Styles
 */

/* Main container */
.gfmp-form-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333333;
}

/* Form styles */
.gfmp-form {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.gfmp-form-row {
    margin-bottom: 20px;
}

.gfmp-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333333;
}

.gfmp-form-row input[type="number"],
.gfmp-form-row input[type="text"],
.gfmp-form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #333333;
}

.gfmp-form-row input[type="number"]:focus,
.gfmp-form-row input[type="text"]:focus,
.gfmp-form-row select:focus {
    border-color: #2F4F31;
    outline: none;
    box-shadow: 0 0 0 2px rgba(47, 79, 49, 0.2);
}

.gfmp-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.gfmp-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.gfmp-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.gfmp-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.gfmp-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.gfmp-submit-row {
    margin-top: 30px;
    text-align: center;
}

.gfmp-submit-button {
    background-color: #2F4F31;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gfmp-submit-button:hover {
    background-color: #1e3320;
}

/* Loading indicator */
.gfmp-loading {
    display: none;
    text-align: center;
    padding: 30px;
    margin-bottom: 30px;
}

.gfmp-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(47, 79, 49, 0.2);
    border-radius: 50%;
    border-top-color: #2F4F31;
    animation: gfmp-spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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

.gfmp-loading p {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #333333;
}

.gfmp-loading-subtext {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: normal !important;
}

/* Error message */
.gfmp-error {
    display: none;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.gfmp-error p {
    margin: 0;
    color: #d32f2f;
}

/* Results */
.gfmp-results {
    display: none;
}

.gfmp-meal-plan {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.gfmp-header {
    background-color: #2F4F31;
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.gfmp-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.gfmp-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.gfmp-button {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gfmp-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.gfmp-button .dashicons {
    margin-right: 5px;
}

.gfmp-meal-plan-content {
    padding: 0;
}

.gfmp-day {
    border-bottom: 1px solid #eee;
}

.gfmp-day:last-child {
    border-bottom: none;
}

.gfmp-day-header {
    padding: 15px 25px;
    background-color: #f9f9f9;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.gfmp-day-header:hover {
    background-color: #f5f5f5;
}

.gfmp-day-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

.gfmp-toggle-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}

.gfmp-toggle-icon:before,
.gfmp-toggle-icon:after {
    content: '';
    position: absolute;
    background-color: #2F4F31;
    transition: transform 0.2s ease;
}

.gfmp-toggle-icon:before {
    width: 2px;
    height: 20px;
    left: 9px;
    top: 0;
}

.gfmp-toggle-icon:after {
    width: 20px;
    height: 2px;
    left: 0;
    top: 9px;
}

.gfmp-day-header.gfmp-active .gfmp-toggle-icon:before {
    transform: rotate(90deg);
}

.gfmp-day-content {
    display: none;
    padding: 0;
}

.gfmp-meal {
    border-bottom: 1px solid #eee;
    margin: 0 15px;
}

.gfmp-meal:last-child {
    border-bottom: none;
}

.gfmp-meal-header {
    padding: 15px 10px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
}

.gfmp-meal-header:hover {
    background-color: #f9f9f9;
}

.gfmp-meal-header h4 {
    margin: 0;
    padding-right: 30px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.gfmp-meal-header .gfmp-toggle-icon {
    width: 16px;
    height: 16px;
}

.gfmp-meal-header .gfmp-toggle-icon:before {
    height: 16px;
    left: 7px;
}

.gfmp-meal-header .gfmp-toggle-icon:after {
    width: 16px;
    top: 7px;
}

.gfmp-meal-header.gfmp-active .gfmp-toggle-icon:before {
    transform: rotate(90deg);
}

.gfmp-meal-content {
    display: none;
    padding: 0 10px 20px;
}

.gfmp-meal-description {
    margin-bottom: 15px;
}

.gfmp-meal-description p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.gfmp-meal-ingredients,
.gfmp-meal-instructions {
    margin-bottom: 15px;
}

.gfmp-meal-ingredients h5,
.gfmp-meal-instructions h5 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

.gfmp-meal-ingredients ul,
.gfmp-meal-instructions ol {
    margin: 0;
    padding-left: 25px;
}

.gfmp-meal-ingredients li,
.gfmp-meal-instructions li {
    margin-bottom: 5px;
    color: #555;
    line-height: 1.5;
}

.gfmp-shopping-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.gfmp-shopping-list-header {
    background-color: #2F4F31;
    color: white;
    padding: 15px 25px;
    cursor: pointer;
    position: relative;
}

.gfmp-shopping-list-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.gfmp-shopping-list-header .gfmp-toggle-icon:before,
.gfmp-shopping-list-header .gfmp-toggle-icon:after {
    background-color: white;
}

.gfmp-shopping-list-content {
    display: none;
    padding: 20px 25px;
}

.gfmp-shopping-category {
    margin-bottom: 25px;
}

.gfmp-shopping-category:last-child {
    margin-bottom: 0;
}

.gfmp-shopping-category h4 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    border-bottom: 2px solid #2F4F31;
    padding-bottom: 8px;
}

.gfmp-shopping-category ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gfmp-shopping-category li {
    margin-bottom: 8px;
}

.gfmp-shopping-category label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.gfmp-shopping-item-checkbox {
    margin-top: 3px;
    margin-right: 10px;
}

.gfmp-shopping-item-text {
    line-height: 1.5;
    color: #555;
}

.gfmp-shopping-item-checkbox:checked + .gfmp-shopping-item-text {
    text-decoration: line-through;
    color: #999;
}

/* Print styles */
@media print {
    .gfmp-form,
    .gfmp-loading,
    .gfmp-error,
    .gfmp-actions,
    .gfmp-toggle-icon {
        display: none !important;
    }

    .gfmp-day-content,
    .gfmp-meal-content,
    .gfmp-shopping-list-content {
        display: block !important;
    }

    .gfmp-meal-plan,
    .gfmp-shopping-list {
        box-shadow: none !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid;
    }

    .gfmp-header,
    .gfmp-shopping-list-header {
        background-color: #f9f9f9 !important;
        color: #333333 !important;
        padding: 15px !important;
    }

    .gfmp-header h2,
    .gfmp-shopping-list-header h3 {
        color: #2F4F31 !important;
    }

    .gfmp-day-header {
        background-color: #f5f5f5 !important;
        padding: 10px 15px !important;
    }

    .gfmp-meal-header {
        padding: 10px 0 !important;
    }

    .gfmp-meal-content {
        padding: 0 0 15px !important;
    }

    .gfmp-shopping-category h4 {
        border-bottom-color: #ccc !important;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .gfmp-form {
        padding: 20px;
    }

    .gfmp-checkbox-group {
        flex-direction: column;
        gap: 10px;
    }

    .gfmp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gfmp-actions {
        margin-top: 15px;
    }

    .gfmp-day-header h3 {
        font-size: 18px;
    }

    .gfmp-meal-header h4 {
        font-size: 16px;
    }
}
