/* Frontend styles for food calorie search */

:root {
    --fcs-black: #090909;
    --fcs-lime: #b5e82f;
    --fcs-white: #fff;
    --fcs-gray: #f5f5f5;
    --fcs-border: #ddd;
}

.fcs-calorie-search {
    background: var(--fcs-black);
    color: var(--fcs-white);
    padding: 30px;
    border-radius: 12px;
    font-family: inherit;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fcs-calorie-search .fcs-title {
    color: var(--fcs-lime);
    margin-bottom: 20px;
    font-size: 24px;
    text-align: right;
}

.fcs-search-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fcs-search-box input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 14px;
    border: 2px solid var(--fcs-lime);
    border-radius: 6px;
    background: #1a1a1a;
    color: var(--fcs-white);
    font-size: 16px;
    transition: border-color 0.3s;
}

.fcs-search-box input[type="search"]:focus {
    outline: none;
    border-color: #d4ff4d;
}

.fcs-btn {
    background: var(--fcs-lime);
    color: var(--fcs-black);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.fcs-btn:hover {
    background: #c4f535;
    transform: scale(1.03);
}

.fcs-results {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fcs-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-right: 4px solid var(--fcs-lime);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    text-align: right;
}

.fcs-card-info {
    flex: 1;
    min-width: 200px;
}

.fcs-card-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--fcs-white);
}

.fcs-card-aliases {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
}

.fcs-card-serving {
    font-size: 14px;
    color: #ccc;
}

.fcs-card-calories {
    background: var(--fcs-lime);
    color: var(--fcs-black);
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 20px;
    white-space: nowrap;
}

.fcs-card-calories small {
    display: block;
    font-size: 11px;
    text-align: center;
    font-weight: normal;
    margin-top: 2px;
}

.fcs-status {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #aaa;
}

.fcs-error {
    color: #ff6b6b;
    font-weight: bold;
}

.no-results {
    text-align: center;
    color: var(--fcs-lime);
    font-size: 16px;
}

/* Loading spinner */
.fcs-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(181, 232, 47, 0.2);
    border-top-color: var(--fcs-lime);
    border-radius: 50%;
    animation: fcs-spin 0.8s linear infinite;
    margin: 10px auto;
}

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

/* Responsive */
@media (max-width: 600px) {
    .fcs-calorie-search {
        padding: 20px;
        margin: 10px;
    }

    .fcs-search-box {
        flex-direction: column;
    }

    .fcs-btn {
        width: 100%;
    }

    .fcs-card {
        flex-direction: column;
        text-align: center;
    }

    .fcs-card-calories {
        width: 100%;
    }
}