/*
 * JAK – Saját adatok / felső összefoglaló
 *
 * Asztali nézetben a négy kártya egy sorban van.
 * A 980 px alatti nézet két oszlopra, 620 px alatt egy oszlopra vált.
 */

.jak-profile-overview {
    display: grid;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 1.05fr)
        minmax(0, 1.35fr)
        minmax(0, 1.40fr);
    gap: 18px;
    width: 100%;
    align-items: start;
}

.jak-profile-overview-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
}

.jak-profile-overview-title {
    margin: 0 0 10px;
    padding: 0 0 7px;
    border-bottom: 1px solid #d8d8d8;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.jak-profile-overview-row {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0 0 5px;
    min-width: 0;
    line-height: 1.45;
    white-space: nowrap;
}

.jak-profile-overview-label {
    flex: 0 0 auto;
    font-weight: 700;
    white-space: nowrap;
}

.jak-profile-overview-value {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
}

.jak-profile-no-wrap {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

/*
 * Az utazási összefoglaló a PHP-ból formázott HTML-ként érkezik.
 * A kézi <br> sortöréseket megtartjuk, de a sorokon belül nem engedünk törést.
 */
.jak-profile-overview-travel-content,
.jak-profile-overview-travel-content * {
    max-width: none !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.jak-profile-overview-travel-content {
    white-space: nowrap;
    line-height: 1.45;
}

.jak-profile-overview-travel-content strong,
.jak-profile-overview-travel-content span {
    white-space: nowrap !important;
}

@media (max-width: 980px) {
    .jak-profile-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .jak-profile-overview {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .jak-profile-overview-row {
        white-space: normal;
        flex-wrap: wrap;
    }

    .jak-profile-overview-value,
    .jak-profile-overview-travel-content {
        white-space: normal;
    }
}


/* Profil – rádiós panelválasztó */
.jak-profile-panel-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin: 16px 0;
    padding: 10px 14px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #fafafa;
    font-size: 14px;
}

.jak-profile-panel-selector label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.jak-profile-panel-selector input[type="radio"] {
    margin: 0;
    accent-color: #267a39;
}

.jak-profile-panel-selector input[type="radio"]:checked + span {
    font-weight: 700;
    color: #205f30;
}

/* Profil – Mit viszek panel */
.jak-supplies-profile-panel {
    display: none;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
}

.jak-supplies-profile-panel h4 {
    margin: 0 0 6px;
    font-size: 17px;
}

.jak-supplies-profile-help {
    margin: 0 0 14px;
}

.jak-supplies-section-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #dddddd;
}

.jak-supplies-section-block h5 {
    margin: 0 0 10px;
    font-size: 15px;
}

.jak-supplies-profile-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.jak-supplies-profile-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
}

.jak-supplies-profile-table th {
    padding: 8px 7px;
    border-bottom: 1px solid #d7d7d7;
    text-align: center;
    font-weight: 700;
    line-height: 1.25;
}

.jak-supplies-profile-table th:first-child {
    text-align: left;
}

.jak-supplies-profile-table td {
    padding: 8px 7px;
    border-bottom: 1px solid #ececec;
    vertical-align: middle;
}

.jak-supplies-profile-table td:not(:first-child) {
    text-align: center;
}

.jak-supplies-profile-table .jak-col-item {
    width: 42%;
}

.jak-supplies-profile-table .jak-col-required {
    width: 18%;
}

.jak-supplies-profile-table .jak-col-own {
    width: 24%;
}

.jak-supplies-profile-table .jak-col-save {
    width: 16%;
}

.jak-supplies-quantity-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.jak-supplies-quantity-inline input {
    width: 82px;
    box-sizing: border-box;
    padding: 6px 7px;
    text-align: right;
}

.jak-supplies-new-offer-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 120px 130px 86px;
    align-items: end;
    gap: 10px;
}

.jak-supplies-new-offer-form label {
    display: grid;
    gap: 5px;
    margin: 0;
}

.jak-supplies-new-offer-form input,
.jak-supplies-new-offer-form select {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
}

.jak-supplies-reactivated-row {
    background: #fff7dc;
}

.jak-supplies-reactivated-note {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #666666;
}

.jak-supplies-empty {
    padding: 16px !important;
    text-align: center !important;
    color: #666666;
}

.jak-btn-danger {
    background: #a63636;
    border-color: #a63636;
    color: #ffffff;
}

.jak-btn-danger:hover {
    background: #8d2d2d;
    border-color: #8d2d2d;
}

.jak-supplies-toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 100000;
    display: grid;
    gap: 8px;
    width: min(390px, calc(100vw - 44px));
    pointer-events: none;
}

.jak-supplies-toast {
    position: relative;
    padding: 13px 38px 13px 14px;
    border: 1px solid #d7bd69;
    border-radius: 8px;
    background: #fff8dc;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.jak-supplies-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.jak-supplies-toast-close {
    position: absolute;
    top: 5px;
    right: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 760px) {
    .jak-profile-panel-selector {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .jak-supplies-new-offer-form {
        grid-template-columns: 1fr 1fr;
    }

    .jak-supplies-new-offer-form label:first-of-type {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .jak-supplies-new-offer-form {
        grid-template-columns: 1fr;
    }

    .jak-supplies-new-offer-form label:first-of-type {
        grid-column: auto;
    }
}

/* Profilkártyák – laptop és hosszú szövegek */
@media (max-width: 1250px) {
    .jak-profile-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

.jak-profile-overview-row {
    align-items: flex-start;
    white-space: normal;
}

.jak-profile-overview-label {
    white-space: nowrap;
}

.jak-profile-overview-value {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.jak-profile-overview-travel-content,
.jak-profile-overview-travel-content * {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.jak-profile-overview-travel-content strong {
    white-space: nowrap !important;
}

.jak-profile-no-wrap {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

@media (max-width: 620px) {
    .jak-profile-overview {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
