/*
============================================================
AI FUNCTION CONFIGURATION UI V1
============================================================
*/


.afc-section {
    margin-bottom: 8px;
}


.afc-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


.afc-card {
    padding: 20px;
    border: 1px solid rgba(120, 120, 120, 0.20);
    border-radius: 16px;
}


.afc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}


.afc-title {
    font-size: 21px;
    font-weight: 800;
}


.afc-code {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.52;
}


.afc-output-count {
    flex-shrink: 0;
    text-align: right;
}


.afc-output-count span {
    display: block;
    font-size: 12px;
    opacity: 0.60;
}


.afc-output-count strong {
    display: block;
    margin-top: 2px;
    font-size: 24px;
}


.afc-field {
    margin-top: 16px;
}


.afc-field > label,
.afc-prompt-head label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}


.afc-field input,
.afc-field textarea {
    width: 100%;
    box-sizing: border-box;
}


.afc-prompt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


.afc-prompt-head span {
    font-size: 12px;
    opacity: 0.55;
}


.afc-prompt {
    min-height: 300px;
    resize: vertical;
    line-height: 1.55;
}


.afc-model-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}


.afc-model-card {
    padding: 16px;
    border: 1px solid rgba(120, 120, 120, 0.18);
    border-radius: 14px;
}


.afc-model-title {
    font-size: 12px;
    opacity: 0.58;
}


.afc-model-name {
    margin-top: 2px;
    margin-bottom: 14px;
    font-size: 20px;
    font-weight: 800;
}


.afc-model-card > label {
    display: block;
    margin-top: 12px;
    margin-bottom: 7px;
}


.afc-model-card input[type="number"] {
    width: 100%;
    box-sizing: border-box;
}


.afc-checkbox {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin-top: 16px !important;
    cursor: pointer;
}


.afc-function-toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid rgba(120, 120, 120, 0.18);
    border-radius: 14px;
    cursor: pointer;
}


.afc-function-toggle input {
    margin-top: 4px;
}


.afc-function-toggle strong {
    display: block;
}


.afc-function-toggle small {
    display: block;
    margin-top: 3px;
    opacity: 0.60;
}


.afc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}


.afc-update-info {
    font-size: 12px;
    opacity: 0.58;
}


.afc-save-button {
    min-width: 130px;
}


.afc-card-message {
    min-height: 18px;
    margin-top: 10px;
}


@media (max-width: 700px) {

    .afc-model-grid {
        grid-template-columns: 1fr;
    }


    .afc-footer {
        flex-direction: column;
        align-items: stretch;
    }


    .afc-save-button {
        width: 100%;
    }


    .afc-card-head {
        flex-direction: column;
    }


    .afc-output-count {
        text-align: left;
    }
}
