/* =========================
   SUPPLIER EDIT MODAL
   ========================= */

.supplier-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.supplier-edit-modal.open {
    display: flex;
}


/* =========================
   PANEL
   ========================= */

.supplier-edit-panel {
    width: min(540px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 18px;

    padding: 26px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.35);
}


/* =========================
   HEADER
   ========================= */

.supplier-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 24px;
}

.supplier-edit-header h2 {
    margin: 4px 0 6px;
    font-size: 24px;
}

.supplier-edit-header p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.supplier-edit-header .modal-label {
    display: block;

    color: var(--accent);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}


/* =========================
   CLOSE X
   ========================= */

.supplier-edit-header .modal-close {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface-hover);
    color: var(--text);

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.supplier-edit-header .modal-close:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}


/* =========================
   FORM
   ========================= */

.supplier-edit-panel .form-group {
    margin-bottom: 18px;
}

.supplier-edit-panel .form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 13px;
    font-weight: 600;
}

.supplier-edit-panel input,
.supplier-edit-panel textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 11px 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--background);
    color: var(--text);

    font: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.supplier-edit-panel textarea {
    resize: vertical;
    min-height: 92px;
}

.supplier-edit-panel input:focus,
.supplier-edit-panel textarea:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px rgba(255, 109, 0, 0.12);
}


/* =========================
   RATING
   ========================= */

.supplier-edit-rating {
    display: flex;
    align-items: center;
    gap: 6px;

    min-height: 38px;
}

.supplier-edit-rating button {
    border: 0;
    padding: 0;

    background: transparent;
    color: var(--muted);

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.supplier-edit-rating button:hover {
    transform: scale(1.12);
}

.supplier-edit-rating button.selected {
    color: var(--accent);
}


/* =========================
   ACTIONS
   ========================= */

.supplier-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 26px;
    padding-top: 18px;

    border-top: 1px solid var(--border);
}

.supplier-edit-actions button {
    min-width: 120px;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {

    .supplier-edit-modal {
        padding: 14px;
    }

    .supplier-edit-panel {
        padding: 20px;
        border-radius: 14px;
    }

    .supplier-edit-actions {
        flex-direction: column-reverse;
    }

    .supplier-edit-actions button {
        width: 100%;
    }

}
/* =========================
   SUPPLIER CARD EDIT BUTTON
   ========================= */

.contact-card-actions {
    display: flex;
    justify-content: flex-end;

    margin-top: 14px;
    padding-top: 12px;

    border-top: 1px solid var(--border);
}

.supplier-edit-button {
    min-width: 88px;

    padding: 8px 16px;

    border: 1px solid var(--accent);
    border-radius: 9px;

    background: transparent;
    color: var(--accent);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.supplier-edit-button:hover {
    background: var(--accent);
    color: #fff;

    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.18);
}

.supplier-edit-button:active {
    transform: translateY(0);
}
/* Supplier card rating stars */
.contact-card .stars-filled,
.contact-card .stars-empty {
    font-size: 20px;
}
