/* =============================================
   High Lysine Low Arginine Diet Planner – Modern UI
   ============================================= */

#ladp-planner {
    padding: 2rem;
    border: none;
    border-radius: 12px;
    max-width: 90vw;
    width: 100%;
    margin: 2rem auto;
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    box-sizing: border-box;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#ladp-planner h3 {
    text-align: center;
    color: #424242;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
}

#ladp-planner h3::before {
    content: "🥗";
    display: block !important;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.ladp-intro {
    text-align: center;
    color: #616161;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

#ladp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ladp-form-group {
    margin-bottom: 0;
}

.ladp-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: #616161;
}

.ladp-required {
    color: #d32f2f;
    font-weight: bold;
}

.ladp-form-group select,
.ladp-form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ladp-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23616161' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px 8px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.ladp-form-group select:focus,
.ladp-form-group input[type="text"]:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    outline: none;
}

.ladp-form-group input[type="text"]::placeholder {
    color: #9e9e9e;
    font-style: italic;
}

/* Trust Indicators */
.ladp-trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: center;
    padding: 0.75rem 0;
}

.ladp-trust-indicators span {
    font-size: 0.85rem;
    color: #2e7d32;
    font-weight: 500;
    white-space: nowrap;
}

/* Cloudflare Turnstile */
#ladp-planner .cf-turnstile {
    display: flex;
    justify-content: center;
}

/* Submit Button */
#ladp-planner button[type="submit"] {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

#ladp-planner button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

#ladp-planner button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   Result Card Styling
   ============================================= */

#ladp-planner #ladp-result {
    text-align: left;
    font-size: 1rem;
    margin-top: 1.5rem;
    padding: 0;
    border-radius: 8px;
    transition: all 0.3s;
}

#ladp-planner #ladp-result.has-result {
    padding: 1.25rem 1.5rem;
    background-color: #f1f8e9;
    border: 1px solid #c5e1a5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: ladp-fadeIn 0.5s ease-in;
}

#ladp-planner #ladp-result.error {
    background-color: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: bold;
    animation: ladp-fadeIn 0.5s ease-in;
}

/* Section Titles */
.ladp-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1b5e20;
    margin: 1rem 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ladp-section-title:first-child {
    margin-top: 0;
}

.ladp-section-title.ladp-limit-title {
    color: #c62828;
}

.ladp-section-title.ladp-score-title {
    color: #1565c0;
}

.ladp-section-title.ladp-tests-title {
    color: #37474f;
}

.ladp-section-title.ladp-tip-title {
    color: #6a1b9a;
}

/* Recommended Foods (green items) */
#ladp-planner .ladp-food-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
}

#ladp-planner .ladp-food-list li {
    padding: 0.4rem 0 0.4rem 1.75rem !important;
    position: relative;
    color: #424242;
    font-size: 0.95rem;
    list-style: none !important;
}

#ladp-planner .ladp-food-list.ladp-recommended li::before {
    content: "✔";
    position: absolute;
    left: 0 !important;
    top: 0.4rem;
    color: #2e7d32;
    font-weight: bold;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-size: 0.95rem;
    line-height: 1;
    width: 1.25rem;
    display: inline-block;
}

/* Foods to Limit (red items) */
#ladp-planner .ladp-food-list.ladp-limit li::before {
    content: "✗";
    position: absolute;
    left: 0 !important;
    top: 0.4rem;
    color: #c62828;
    font-weight: bold;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-size: 0.95rem;
    line-height: 1;
    width: 1.25rem;
    display: inline-block;
}

/* Balance Score Badge */
.ladp-score-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.ladp-score-good {
    background-color: #c8e6c9;
    color: #1b5e20;
}

.ladp-score-moderate {
    background-color: #fff9c4;
    color: #f57f17;
}

.ladp-score-needs {
    background-color: #ffcdd2;
    color: #b71c1c;
}

/* Tests list */
#ladp-planner .ladp-tests-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
}

#ladp-planner .ladp-tests-list li {
    padding: 0.3rem 0 0.3rem 1.75rem !important;
    position: relative;
    color: #424242;
    font-size: 0.95rem;
    list-style: none !important;
}

#ladp-planner .ladp-tests-list li::before {
    content: "•";
    position: absolute;
    left: 0.25rem !important;
    top: 0.3rem;
    color: #37474f;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    width: 1.25rem;
    display: inline-block;
}

/* Diet Tip */
.ladp-diet-tip {
    color: #424242;
    font-size: 0.95rem;
    padding-left: 0.5rem !important;
    border-left: 3px solid #ce93d8;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Loading state */
#ladp-planner #ladp-result.loading {
    text-align: center;
    padding: 1rem;
    color: #616161;
    font-style: italic;
}

@keyframes ladp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   Mobile Responsiveness
   ============================================= */

@media (max-width: 768px) {
    #ladp-planner {
        padding: 1rem;
        margin: 1rem auto;
        max-width: 95vw;
    }

    #ladp-planner h3 {
        font-size: 1.25rem;
    }

    .ladp-intro {
        font-size: 0.9rem;
    }

    .ladp-form-group select,
    .ladp-form-group input[type="text"] {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    #ladp-planner button[type="submit"] {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    #ladp-result {
        font-size: 0.9rem;
    }

    .ladp-trust-indicators {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    #ladp-planner {
        padding: 0.75rem;
        margin: 0.75rem auto;
    }

    #ladp-planner h3 {
        font-size: 1.1rem;
    }

    .ladp-form-group label {
        font-size: 0.9rem;
    }

    .ladp-form-group select,
    .ladp-form-group input[type="text"] {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    #ladp-planner button[type="submit"] {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    #ladp-result {
        font-size: 0.85rem;
    }
}
