/* ── Edit Document Modal ── */

.edit-doc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.edit-doc-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.edit-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.edit-doc-header h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.edit-doc-overlay .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    line-height: 1;
}

.edit-doc-form .form-group {
    margin-bottom: 14px;
}

.edit-doc-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.edit-doc-form .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.edit-doc-form .renewal-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 14px;
}

.edit-doc-form .renewal-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.edit-doc-form .notify-toggle-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.edit-doc-form .notify-toggle-group > .toggle-switch {
    display: flex;
    align-items: center;
}

.edit-doc-form .notify-toggle-group .toggle-label {
    display: inline-block;
    margin-bottom: 0;
    position: relative;
    width: 50px;
    height: 24px;
    background: #ced4da;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.edit-doc-form .notify-toggle-group .toggle-label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.edit-doc-form .toggle-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.edit-doc-form .toggle-switch input[type="checkbox"]:checked + .toggle-label {
    background: #667eea;
}

.edit-doc-form .toggle-switch input[type="checkbox"]:checked + .toggle-label:before {
    transform: translateX(26px);
}

.edit-doc-form .notify-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-doc-form .notify-label-row > label {
    display: inline;
    margin: 0;
}

.edit-doc-form .notify-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s ease;
}

.edit-doc-form .notify-info-icon:hover {
    color: #667eea;
}

.edit-doc-form .notify-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -8px;
    background: #f0f1f3;
    color: #333;
    font-size: 0.75rem;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 6px;
    width: 200px;
    z-index: 100;
    pointer-events: none;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.edit-doc-form .notify-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 5px solid transparent;
    border-top-color: #f0f1f3;
}

.edit-doc-form .notify-hint {
    display: none;
}

.edit-doc-form .renewal-row input[type="date"].form-input {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    padding-right: 36px;
}

.edit-doc-form .renewal-row input[type="date"].form-input::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.edit-doc-form .doc-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-doc-form .doc-edit-actions .btn {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 20px;
}
