/* =============================================================
   Custom Add to Cart Fields — cacf-styles.css
   Version: 2.3.0
   ============================================================= */

/* --- Animációk -------------------------------------------- */

@keyframes cacf-flash-success {
    0%   { border-color: #ccc;     background: transparent; }
    30%  { border-color: #95C138; background: rgba(149, 193, 56, 0.12); }
    100% { border-color: #ccc;     background: transparent; }
}

@keyframes cacf-flash-error {
    0%   { border-color: #ccc;     background: transparent; }
    30%  { border-color: #e2401c; background: rgba(226, 64, 28, 0.10); }
    100% { border-color: #ccc;     background: transparent; }
}

@keyframes cacf-cart-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* --- Form ------------------------------------------------- */

.cacf-form {
    margin-top: 10px;
}

.cacf-fields-wrapper {
    border: 1px solid #ccc;
    padding: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cacf-flash-success {
    animation: cacf-flash-success 0.7s ease-out forwards;
}

.cacf-flash-error {
    animation: cacf-flash-error 0.7s ease-out forwards;
}

/* --- BAL OLDAL -------------------------------------------- */

.cacf-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 140px;
}

.cacf-field-group {
    display: flex;
    flex-direction: column;
}

.cacf-label {
    margin-bottom: 2px;
}

.cacf-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cacf-qty-input {
    width: 60px;
    text-align: center;
}

/* --- JOBB OLDAL ------------------------------------------- */

.cacf-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    font-size: 0.85em;
    line-height: 1.6;
    text-align: right;
}

.cacf-sku {
    font-weight: bold;
}

/* --- GOMB ------------------------------------------------- */

.cacf-submit-btn {
    padding: 6px 12px;
    min-height: 36px;
    background: #95C138;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.cacf-submit-btn:hover {
    background: #7ea82e;
}

.cacf-submit-btn:active {
    background: #6a8f26;
    transform: scale(0.97);
}

.cacf-submit-btn:disabled,
.cacf-submit-btn.cacf-loading {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

/* --- Kosár ikon animáció ---------------------------------- */

.cacf-cart-bump {
    animation: cacf-cart-bump 0.4s ease-out;
    display: inline-block;
}

/* --- Responsív -------------------------------------------- */

@media (max-width: 480px) {
    .cacf-right {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .cacf-qty-input {
        min-height: 44px;
        min-width: 44px;
    }

    .cacf-submit-btn {
        width: 100%;
        min-height: 44px;
        font-size: 1em;
    }
}
