/* --- Osnovno --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}
.modal-overlay[aria-hidden="false"] { display: flex; }

.modal-box {
    background: #fff;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.2);
    position: relative;
}

/* --- Header --- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.modal-title {
    margin: 0;
    font-size: 30px;
    font-weight: 400;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* --- Field --- */
.modal-field { margin: 30px 0 15px 0; display: grid; gap: 6px; }
.modal-label { font-size: 16px; font-weight: 400; margin-bottom: 3px; }
.modal-input {
    padding: 15px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}
.modal-input:focus { outline: none; border-color: #ef000c; box-shadow: 0 0 0 3px rgba(213,10,17,.25); }
.modal-field input:-webkit-autofill,
.modal-field input:-webkit-autofill:hover,
.modal-field input:-webkit-autofill:focus,
.modal-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #000 !important;
    transition: background-color 9999s ease-out 0s;
}
/* --- Footer --- */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}
.modal-btn {
    padding: 10px 30px;
    font-size: 20px;
    border-radius: 6px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 400;
}
.modal-cancel { background: #f3f4f6; color: #111; }
.modal-submit { background: #D50A11; color: #fff; }
.modal-cancel:hover { background: #e5e7eb; }
.modal-submit:hover { background: #ef000c; }

/* --- Sporočila --- */
.modal-error { color: #b91c1c; font-size: 13px; min-height: 1.2em; }
.modal-success {
    display: none;
    margin-top: 12px;
    font-size: 14px;
    color: #065f46;
    background: #ecfdf5;
    padding: 8px 10px;
    border-radius: 6px;
}
.modal-success.show { display: block; }
